Outlook collection taking 100x longer to delete than create

bonkey

New Member
Joined
Jan 11, 2010
Messages
33
Having a weird issue. I am loading in some data from a file it makes about 1.6 million records in a collection. (collection of class objects).

When I am all done and want to close the spreadsheet it takes over 30 minutes to close.

I tested it by setting all my in memory objects to nothing that the issue is in my giant collection.

It only takes a short time to read the file and build the collection list but setting that collection = nothing takes forever (over 30 mins).

Any ideas?
 
Re: Collection taking 100x longer to delete than create

No it doesn't have any terminate code.
 
Last edited:
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Re: Collection taking 100x longer to delete than create

I added a timer and found that around 30,000 records it starts to take more time to delete than it does to create. I think this must just be a memory handling bug in excel.
 
Upvote 0
Re: Collection taking 100x longer to delete than create

Probably a stupid question but, why are you reading all the records into a collection in Excel?
 
Upvote 0
Re: Collection taking 100x longer to delete than create

Its a file parser app. It is reading in the records to process. By putting them in a collection I can easily access the records later. It has never been an issue before.
 
Upvote 0
Re: Collection taking 100x longer to delete than create

Do you need to store all of the records in the same collection simultaneously?

Actually, do you need to store them all in Excel?

Couldn't you read them in one by one, parse/process them, write the parsed data elsewhere?
 
Upvote 0

Forum statistics

Threads
1,223,806
Messages
6,174,725
Members
452,578
Latest member
Predaking

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top