[PATCH] Cache xkbcomp output
daniel at fooishbar.org
Thu Jul 19 15:37:07 PDT 2012
On 19 July 2012 22:53, Keith Packard <keithp at keithp.com> wrote:
> Adam Jackson <ajax at nwnk.net> writes:
>> I think there's a combination of factors that pile on to make it worse
>> than you'd expect.
> And, caching is completely free, so it seems sensible to just do it
It's free to not unlink the file, but you still have the overhead of
opening and reparsing the file every time. A more sensible interim
strategy (IMO) would be to always fork xkbcomp once during startup,
preserve the resulting XkbDescRec, then hand that back every time
someone asks for the same keymap, which is pretty much all the time.
It's really not a lot of code either.
> long as we deal with the consequences of XKB data files that aren't up
> to date. Oh, we could actually make the xkb 'make install' clear the
> cache if it finds one, so people installing from git also get something
> working ootb.
It's those caveats that scare the living shit out of me. I really
don't want to make XKB any less supportable than it already is, so I'm
not going to ack any patch along these lines. OTOH, I can hardly say
with a straight face that I'm maintaining it in X these days, so I'm
not going to nack it either. *shrug*
More information about the xorg-devel