Feature Request - FastAdd Collection Method

Posts   
 
    
jshallard
User
Posts: 62
Joined: 23-Mar-2005
# Posted on: 17-Aug-2005 17:06:41   

Would it possible to make the FastAdd method of EntityCollectionBase public? When working with very large collections the if(List.Contains(entityToAdd))... code called in the _ Add_ method makes it very slow to work with (takes approx 1/2 a second to add a single entity to a collection with 50k items).

I am restricted to using the release builds, and so can not easily change the code myself.

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 17-Aug-2005 22:06:13   

jshallard wrote:

Would it possible to make the FastAdd method of EntityCollectionBase public? When working with very large collections the if(List.Contains(entityToAdd))... code called in the _ Add_ method makes it very slow to work with (takes approx 1/2 a second to add a single entity to a collection with 50k items).

I am restricted to using the release builds, and so can not easily change the code myself.

Hi, there. Set EntityCollection.DoNotPerformAddIfPresent = False. This will disable the Contains() call when manually adding entities.

Jeff...

jshallard
User
Posts: 62
Joined: 23-Mar-2005
# Posted on: 20-Aug-2005 14:00:49   

DoNotPerformAddIfPresent does not seem to exist in the selfservice collections. Am i missing it, or is there a reason for this?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 21-Aug-2005 11:14:26   

FastAdd is now internal, I'll make it public in the next upgrade.

Frans Bouma | Lead developer LLBLGen Pro