[PATCH] Improving _XimParseStringFile

Vincent Torri vtorri at univ-evry.fr
Fri Apr 10 06:57:23 PDT 2009



On Fri, 10 Apr 2009, Cedric BAIL wrote:

> On Thu, Apr 9, 2009 at 5:39 PM, Alan Coopersmith
> <Alan.Coopersmith at sun.com> wrote:
>> Cedric BAIL wrote:
>>>   I am a developper of the Enlightenment project, and during my work
>>> on optimising it, I did find that _XimParseStringFile was accounting
>>> for more than 30% of the time needed to get a window to show (under
>>> valgrind). I am using an Ubuntu Intrepid and it provide a 630KB
>>> "/usr/share/X11/locale/en_US.UTF-8/Compose". So it take a lot of time
>>> to read and parse. I did write a small patch, attached, that use mmap
>>> to read the file, this make _XimParseStringFile only account for 14%
>>> of the time, a little bit better.
>>
>> mmap()'ing sounds like a fine idea, but I wonder if we need any #ifdef's
>> or configure checks for it for platforms like Cygwin, or if it's safe to
>> use on all.
>
> I did ask a friend about Cygwin case, and they provide a working mmap
> implementation. But if libX11 support mingw, we need some #ifdef
> around this mmap.

well, i think that cygwin has an mmap implementation. It would be quite 
anormal to not have one, actually.

i use only mingw, and i have written a kind of port of mmap, which seems 
to work with enlightentment libraries on windows with mingw. So, if 
needed, i can provide the code.

Vincent Torri

>
>>> I think that if it's a normal
>>> behaviour to provide a 630KB file to parse (and it sounds like it is
>>> as the last size from libX11 git is around 670KB), changing this file
>>> to precompiled binary file format would be a better patch, sadly I
>>> don't have the needed time to write it right now.
>>
>> I thought that's what was done by the mkcomposecache changes that SuSE
>> contributed a few years ago, but I don't think many people updated their
>> packages to build compose caches.
>
> How can I activate this ? And what about making it on by default ?
>
> -- 
> Cedric BAIL
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
>
> -- 
> Ce message a ?t? v?rifi? par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ?t? trouv?.
> Message d?livr? par le serveur de messagerie de l'Universit? d'Evry.
>
>
>


More information about the xorg-devel mailing list