PC Review


Reply
Thread Tools Rate Thread

Cleaning up large amounts of data

 
 
volt9000@gmail.com
Guest
Posts: n/a
 
      2nd Dec 2007
I'm using PdfSharp (an open-source PDF manipulation library) to
generate a very large PDF ( 1500+ pages.) My program crashes before
reaching the end because of the massive amounts of memory being used
(after 750 entries the memory footprint is ONE GIGABYTE.)

So I've gotten around this by splitting up the word: every X number of
entries, I close the PDF and start a new one, with the intention of
combining the PDFs at the end. The problem is, after all is said and
done, the memory footprint of the program is still quite large (nearly
200MB) despite my attempts to release the object. I've tried several
methods including trying to force the garbage collector (GC.Collect()
and GC.WaitForPendingFinalizers()) but nothing seems to help.

How can I release the memory?
 
Reply With Quote
 
 
 
 
Serge Baltic
Guest
Posts: n/a
 
      2nd Dec 2007
Hello,

> The problem is, after all is said and
> done, the memory footprint of the program is still quite large (nearly
> 200MB) despite my attempts to release the object.


What exactly kind of memory is that? Virtual, commit charge, managed memory?
The metric to check is GC.GetTotalMemory(true) (assuming that the free pdf
component is all managed code). If the managed memory is low, but the commit
charge is high, that's OK and not necessary a leak. That will be reused by
..NET.

If the managed memory is high, you could take some Memory Profiling tool
(I'd use dotTrace) and check the objects that are not being collected. If
they're being held by the pdf component, there's not much that can be done
without editing its code, I'm afraid …

PS. BTW, there's the XPS format that basically counters the PDF functionality,
but is powered by Microsoft and highly integrates with .NET, like, there
are framework classes for generating those documents. Maybe that could serve
as a working alternative for you.

(H) Serge



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphing Large Amounts of Data BSc Chem Eng Rick Microsoft Excel Charting 1 1st Jul 2009 08:41 PM
Graphing Large Amounts of Data BSc Chem Eng Rick Microsoft Excel Misc 1 29th Jun 2009 01:19 PM
Doing Analysis from large amounts of DATA william4444 Microsoft Excel New Users 3 15th May 2006 09:01 AM
Datasets with large amounts of data mikeb Microsoft Dot NET Compact Framework 5 16th Feb 2005 11:55 PM
large amounts of data Terry Microsoft ADO .NET 3 16th Jul 2003 12:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 PM.