[Portland-bugs] [Bug 88524] New: xdg-open is extremely slow because get_key executes grep unnecessarily

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jan 17 00:33:32 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=88524

            Bug ID: 88524
           Summary: xdg-open is extremely slow because get_key executes
                    grep unnecessarily
           Product: Portland
           Version: 1.1.0 rc3
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
          Assignee: portland-bugs at lists.freedesktop.org
          Reporter: alexhenrie24 at gmail.com

Created attachment 112374
  --> https://bugs.freedesktop.org/attachment.cgi?id=112374&action=edit
[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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/portland-bugs/attachments/20150117/10e82bb5/attachment.html>


More information about the Portland-bugs mailing list