GNOME Bugzilla – Bug 616165
Improve reading ps and ps-gz files
Last modified: 2010-04-21 15:19:32 UTC
As per bug #615765, the contents of the ps-gz files are currently read in the following way: * Fork and spawn asynchronously into a gunzip process, and store the decompressed contents in a new temp file up to 20 MBytes. * The, extract the temporary uncompressed file using the ps extractor. The ps-extractor then: * Reads the whole PS file contents line by line, using a newly-allocated buffer for each new line. These extractions can get improved in the following way: * Don't use a temporary file for the uncompressed ps-gz file contents * Re-use the same buffer when iterating each line in the ps extractor, no need to allocate a new one each time. * Stop reading the uncompressed PS file if reached a max limit (maybe the same one of 20MBytes can be used, just a safe one)
Created attachment 159065 [details] [review] Improve reading of PS and PS-GZ files
Pushed to git master after Carlos' review