Bug 88524 - xdg-open is extremely slow because get_key executes grep unnecessarily
Summary: xdg-open is extremely slow because get_key executes grep unnecessarily
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.1.0 rc3
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-17 08:33 UTC by Alex Henrie
Modified: 2015-01-19 16:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] xdg-open: Improve performance of get_key function (891 bytes, text/plain)
2015-01-17 08:33 UTC, Alex Henrie
Details

Description Alex Henrie 2015-01-17 08:33:32 UTC
Created attachment 112374 [details]
[PATCH] xdg-open: Improve performance of get_key function

The attached patch improves the performance of xdg-open by a factor of 10 by avoiding unnecessary grep calls.


Without this optimization:

time ./xdg-open http://www.google.com/
START /usr/lib/firefox/firefox "http://www.google.com/"

(process:17426): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

real	0m7.956s
user	0m1.693s
sys	0m0.453s


With this optimization:

time ./xdg-open http://www.google.com/
START /usr/lib/firefox/firefox "http://www.google.com/"

(process:17531): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

real	0m0.843s
user	0m0.157s
sys	0m0.043s
Comment 1 Rex Dieter 2015-01-19 11:37:54 UTC
committed,thanks.
Comment 2 Alex Henrie 2015-01-19 16:21:35 UTC
Thank you!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.