Skip to content

Conversation

@wismill
Copy link
Member

@wismill wismill commented Nov 14, 2024

Create a keymap compiler server:

  • Cache keymap components right after parsing (XkbFile)
  • Propose a thread-safe atom table variant
  • Use Unix sockets to serve keymap compiler service

This speeds up the xkeyboard-config test by about 5x.

Unfortunately, this adds a fair amount of code, in particular in ast-build.c. I am not sure we are willing to commit to such addition for only this particular use case. Given the include mechanism and the interaction between components, I do not see how to cache things in a better/easier way. Maybe mmaping all files beforehand could save us costly storage reads.

Anyway, this was a good experience for me to understand better our source code, experiment with thread-safe structures and Unix sockets in C.

@wismill wismill added the compile-keymap Indicates a need for improvements or additions to keymap compilation label Nov 14, 2024
@wismill
Copy link
Member Author

wismill commented Nov 14, 2024

@whot @bluetech any suggestion for profiling our code base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compile-keymap Indicates a need for improvements or additions to keymap compilation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant