I'm testing right now. Here are some results:
For 4,909 records in the grid I do not see hourglasses:
AEVENTS call took 0.0000000000 secs.
SetOrder call took 0.0100000000 secs.
ClearHeaderPictures call took 0.0000000000 secs.
SetHeaderPicture call took 0.0000000000 secs.
For 6 records I also do not see hourglasses:
AEVENTS call took 0.0000000000 secs.
SetOrder call took 0.0200000000 secs.
ClearHeaderPictures call took 0.0000000000 secs.
SetHeaderPicture call took 0.0000000000 secs.
For 6 different records:
AEVENTS call took 0.0000000000 secs.
SetOrder call took 0.0000000000 secs.
ClearHeaderPictures call took 0.0200000000 secs.
SetHeaderPicture call took 0.0000000000 secs.
Note, that the results are non-consistant.
>Hi Nadya
>
>All I can suggest is you use the coverage profiler.
>
>>>
>>>This seems to be part of some framework. Debugging and optimizing framework code can be complex. However, the refresh of the grid can be time consuming. Especially with a filter. Either GOTO command can also be a problem with a filter. If this is some framework, how are you making changes? You'd have to copy the parent code to a subclass and change that, or risk losing your changes when the next version of the framework comes out.
>>>
>>
>>Hi Mike,
>>
>>I created my own subclass named grdSorting. In this method I copied the parent code and made few changes (see NN changes indications). I should update the Header to reflect, it's a grdSorting class, not the cGrid. If the new version of the framework comes and the SetOrder method changes, my class would still use my own code. But we're not anticipating a new version of the framework, though it's a pity.
>>
>>The grid uses a cursor as its recordsource. The cursor is created in PostInitHook method of the Biz object and it also has all the indexes.
>>
>>>You may want to record the active column to a grid property, so you could reset the picture to default for the last active column when you switch to a new column, instead of resetting all columns.
>>
>>Yes, that was my idea originally, but I thought, it's a minor thing and I doubt, it's the bottleneck. In this particular instance I just have 7 columns. I think, it must be something else.
If it's not broken, fix it until it is.
My Blog