Bug 53540 - Parsing of 'Compose' files is so slow!
Summary: Parsing of 'Compose' files is so slow!
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: 7.7 (2012.06)
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 12:52 UTC by Benoît Minisini
Modified: 2018-08-10 20:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Benoît Minisini 2012-08-15 12:52:38 UTC
When profiling the start-up of my GUI program (the Gambas development environment, based on Qt4 and the Gambas interpreter), I noticed that almost 10% of the start-up time is spent inside a libX11.so function named "_XimParseString". As much time as what is spent by the interpreter itself!

This function is located in the modules/im/ximcp/imLcPrs.c XLib source file.

Half on that time is spent in the nextch() static function of the same source file, because getc() is used for reading each character of the "Compose" file, which is usually half a megabyte.

getc() is very slow. Implementing a buffer without using the libc would speed up things a lot.

I will try to rewrite the file and recompile the libX11 on my system. If I don't succeed, is there any X11 developer or tester there that could test the file for me?

Thanks in advance.
Comment 1 GitLab Migration User 2018-08-10 20:10:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/20.


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.