Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resources Capacity question (Read 1622 times)
BudMan
YaBB Newbies
*
Offline


Credidi me felem vidisse

Posts: 45
Joined: Jul 14th, 2007
Resources Capacity question
Mar 19th, 2008 at 10:19pm
Print Post  
I notice there is a Resources.Capacity property for each Schedule Item. Its default property is 4 which means, again by default, an item can contain no more than 4 resources in its ResourcesCollection.

I can see some of my items having scores of Resources assigned to them. To optimize memory, should I programmatically assign the Resources.Capacity on an item-by-item basis? Or would it be OK to just have a 'plug' default limit of say 100 resources? How would that affect memory and performance?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Resources Capacity question
Reply #1 - Mar 20th, 2008 at 7:57am
Print Post  
The Capacity property is derived from the base CollectionBase class. It indeed refers to the number of elements the collection can contain. Adding more elements to the collection causes this property value to be increased and the internal array where the resources are actually stored to be reallocated. Thus, it is makes sense to assign higher value to this property in the beginning if you expect very dynamic resource association.

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint