libxkbcommon/bench
Ran Benita 1bd3b3c7cb x11: cache X11 atoms
On every keymap notify event, the keymap should be refreshed, which
fetches the required X11 atoms. A big keymap might have a few hundred of
atoms.

A profile by a user has shown this *might* be slow when some intensive
amount of keymap activity is occurring. It might also be slow on a
remote X server.

While I'm not really sure this is the actual bottleneck, caching the
atoms is easy enough and only needs a couple kb of memory, so do that.

On the added bench-x11:

Before: retrieved 2500 keymaps from X in 11.233237s
After : retrieved 2500 keymaps from X in 1.592339s

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-20 13:04:21 +02:00
..
.gitignore bench/compose: add new benchmark 2014-10-05 12:56:46 +03:00
bench.c MSVC: Provide an implementation of gettimeofday() 2019-12-28 16:12:15 +02:00
bench.h bench: simplify the bench helpers 2018-07-05 18:29:39 +03:00
compose.c Open files in binary mode 2019-12-28 13:49:40 +02:00
key-proc.c test/atom: use correct format specifier for size_t 2019-12-28 14:13:52 +02:00
rules.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rulescomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
x11.c x11: cache X11 atoms 2020-11-20 13:04:21 +02:00