Recommended Posts

Hello forum. I'm in the process of rebuilding a FM12 db into a FM16 db. I have many places where I used conditional formatting to hide an object. Some layouts (mostly reports) there are many objects formatted this way. I plan to change them to take advantage of 'Hide object when'.

Does anyone know which one renders faster? Or is it a matter of 'it all depends'?

Share this post

Link to post

Share on other sites

I would suspect Hide is faster. Both redraw upon screen refresh but here are some thoughts on it:

Hide is a boolean on/off whereas conditional formatting must interpret and redraw portions (each attribute) of an object so I suspect Hide would be more efficient.

Hide applies to all objects within a group so one can hide an entire portal, tab control or grouped objects so is easier when dealing with multiple objects.

Conditional formatting does not work on lines around buttons.

Hide can (more easily?) apply also when in find mode.

I am sure there are other considerations. In all, Hide is preferable in most cases whereas conditional formatting is geared towards changing a displayed attribute. Hopefully others will offer their impressions as well.

Edited May 25 by LaRettaadded last bullet

Share this post

Link to post

Share on other sites

I don't know the answer to that and I don't know how one would go about measuring such thing. However, I have reasons to believe that hiding an object is more efficient than formatting it. If the code is well written, then a hidden object would be taken out of the rendering queue altogether - while the conditionally formatted object has to be rendered in context.

Share this post

Link to post

Share on other sites

One more ... conditional formatting cannot make text transparent but instead one must set the font size to extremely large (can fail in some display situations and let part of the text show) or one can color it the same as the background. If you later change the background color and forget to modify the calculation, it will show.

Share this post

Link to post

Share on other sites

Can't remember where I heard this, possibly a Devcon session, but as comment noted: with Hide Object, the layout rendering engine does not have to draw the object at all. So it should be theoretically if not perceptibly faster.

I also find it helpful when I'm looking at a layout to be able to distinguish which objects are actually getting formatted vs. those that are being hidden.