Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object destruction
Message
De
03/02/2014 16:23:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01592795
Message ID:
01593041
Vues:
57
>>>>>The formclass I recently developed can have as much as over 1800 objects. What strikes me is that it builds the form in a snap, but it requires almost a minute to 'destroy'.
>>>>>
>>>>>There's no special, time consuming, code in any Destroy(). And only some have some code in their QueryUnload() or Release().
>>>>>
>>>>>Who knows of any trick to speed up the destruction of the form?
>>>>>
>>>>>Perhaps it's the fact that a subset of those objects have properties that refer to other objects? Hmm, I'll gonna try this out.
>>>>
>>>>Why you destroy all objects of form? Why don't you just release form?
>>>
>>>Releasing a form destroys all the objects on that form. The issue here is that doing so takes too long.
>>
>>Indeed. IMO, the lesson here is: VFP does destroy quick enough, but if the number of objects is VERY LARGE, then it is an issue that needs attention.
>>
>>When is it very large? We found that 2000 is no problem. However, 5000 or more is troublesome. Somewhat smarter coding should focus on reducing the number of objects.
>
>There you go. It's hard to imagine a proper OO design including a class with 2000 objects.

Then try harderr (to imagine). :)

In my case, it is a graph with a vertical bar for each day in a period (max one year). Each day has info about an employee's shift. Also, there's a slider to edit the actual working time in the shift length (the rest of the shift the employee i sick). See the attached picture.

This form could not been built with only some objects. There are several per day. When the period is 365 days, then the number of objects is quite a large number. :)
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform