[PATCH] Cache xkbcomp output
dbn.lists at gmail.com
Thu Jul 19 22:05:30 PDT 2012
On Jul 19, 2012 3:38 PM, "Daniel Stone" <daniel at fooishbar.org> wrote:
> 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.
Don't we already do this? I wrote that patch a couple years ago. You still
have the initial xkbcomp fork that's slow on a cold disk, but the in memory
keymap is pretty much instant for subsequent devices. I'm on my phone and
can't check the archives right now, though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg-devel