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

fix: Optimize use of hash tables in platform adapters #485

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

mwcampbell
Copy link
Contributor

I planned to do this after I changed accesskit_consumer to use hashbrown. I haven't bothered to do this for accesskit_atspi_common or accesskit_unix, since interoperability with zbus is a concern for these crates, and the cumulative binary size of the Unix adapter is already quite big.

Also, for the macOS adapter, I decided that using a hash table to keep track of view subclasses was overkill, since the number of items will always be small, and lookup will be rare. So I decided to favor simplicity and minimal code size instead, by using a Vec with linear search. The other reason to revisit this was to eliminate the dependency on once_cell.

@DataTriny DataTriny merged commit f4f0bfb into main Nov 23, 2024
9 checks passed
@DataTriny DataTriny deleted the more-hashbrown-foldhash branch November 23, 2024 17:01
@github-actions github-actions bot mentioned this pull request Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants