Walter Meester
HoogkarspelNetherlands
General information
Category:
Forms & Form designer
Environment versions
Network:
Windows 2008 Server
>>>BTW, I can simply fool the user by displaying a text like 'Processing 02-02-2014' in each Destroy() of the object that has info of the day. But it's even better to remove with the speed of the addition, which takes less that 2 seconds even if it is a whole year. This addition speed is surprisingly fast because it implies a quite complex processing of a table with info about an employee's working shift times.
>>
>>Did you try to use a method that removes all the objects with an explicit "RemoveObject()" call, rather than relying on native behaviour when the form is destroyed? This method would be better to monitor with set cover as you can see how much time each and every object removal takes.
>
>Yep, see my first message. Using removeobject() improved performance. Native: 55s, my code 25s. However, I removed only some of the objects. My later test drilled down and did a remove starting at the 'youngest' (child) level and ending at the nearly 'oldest' (parent) level. It resulted in 55s. I might try to do the collection phase (which takes a significant part of the processing time) at the init phase....
It indeed might have to do with the fact that there are objects with references to other objects. Can you split up the destoy in two phases? First remove all references to other objects, and only then remove all the objects. Measure the time to do both and draw your conclusion.
Are you using one (or few) specific property for references to other objects? If so, consider using THIS.Setall("MypropertyUsedForObjectReferences", NULL)
Also if you are using collections, and FOR EACH . use the FOXOBJECT clause. This really makes a difference
Walter,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only