After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616165 - Improve reading ps and ps-gz files
Improve reading ps and ps-gz files
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
0.9.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-extractor
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2010-04-19 12:09 UTC by Aleksander Morgado
Modified: 2010-04-21 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improve reading of PS and PS-GZ files (6.19 KB, patch)
2010-04-19 12:13 UTC, Aleksander Morgado
none Details | Review

Description Aleksander Morgado 2010-04-19 12:09:54 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)
Comment 1 Aleksander Morgado 2010-04-19 12:13:44 UTC
Created attachment 159065 [details] [review]
Improve reading of PS and PS-GZ files
Comment 2 Aleksander Morgado 2010-04-21 15:19:32 UTC
Pushed to git master after Carlos' review