Recently we had a performance issue and on investigation found out that apart from the actual cause of problem, some display methods are not cached. So we followed the recommendations and cached the methods using attribute [SysClientCacheDataMethodAttribute(true)].
Every thing was fine until a user complained about performance using a specific customer. We investigated again and found out that one of the display method that we cached in previous findings is causing the issue. It had a IF condition and was doing some heavy calculation in certain cases only. But why this was not a problem before. On further investigation we found that the field on form which was using this display method was hidden. So when the display method was not cached it was not called by system.
However after caching it, upon opening of the form, system was calling the following method
<Table Name>::executeCachedDisplayMethods
This method was calling all the cached display methods of the table regardless of whether the field for the display method is hidden or not. This behavior is different from when the display method is not cached.Our solution to problem was to remove the hidden field from the form.
This posting is provided "AS IS" with no warranties. Use code at your own risk.
No comments:
Post a Comment