Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Hey I have a problem in my .Net application.

Here's the scenario, I have a binary file which I import which is about 8mb in size, I convert this to text and filter on a bunch of fields and then I create a trimmed down version of about 125kb which is fine.

Ok the problem,
When I am converting this file it is using 600mb of Memory because I need to hold the fields in strings which is where my issue is but I don't know how else to hold the data. I have tried disposing of all my strings when I am finished with them but this has no effect.

I'm just wondering can someone shed a bit of light on the situation for me or how to handle it better.

Ask me if I'm not being clear enough.

Thanks Guys...
Posted
Comments
Dave Kreskowiak 10-Sep-13 9:20am    
WE have no idea what you did but for you to take 8MB worth of data and occupy 600MB of memory with it must have taken an extraordinary amount of work. You REALLY had to work to get that to happen.

Since we have no idea what that work entails (you haven't described exactly what you're doing and how you're doing it, code samples would help!) we cannot possibly tell you what you're doing wrong.
frostcox 13-Sep-13 6:51am    
Hey I have a trimmed down version of the project, maybe I could email it on to you and you might throw your eye over it?
Dave Kreskowiak 13-Sep-13 8:06am    
Not a chance. It's here or nothing.
frostcox 13-Sep-13 8:09am    
Fair enough, there's just a lot of code to post here. Thanks anyway
Dave Kreskowiak 13-Sep-13 9:22am    
You post the relevant pieces, not the whole thing.

1 solution

May be the StringBuilder[^] class provides what you need.
 
Share this answer
 
Comments
frostcox 10-Sep-13 9:08am    
Thanks but the way the classes are structured it not going to be a viable option.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900