Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keymap compiler server #536

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Keymap compiler server #536

wants to merge 7 commits into from

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