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

JSON gem is slow parsing integers/floats when there's multiple threads executing at once (in Ractors) #511

Closed
luke-gru opened this issue Jan 23, 2023 · 2 comments

Comments

@luke-gru
Copy link
Contributor

See https://bugs.ruby-lang.org/issues/19288

I've opened this issue just to notify you guys.

@luke-gru luke-gru changed the title JSON gem is very slow parsing integers when there's multiple threads executing at once (in Ractors) JSON gem is very slow parsing integers/floats when there's multiple threads executing at once (in Ractors) Jan 23, 2023
@luke-gru luke-gru changed the title JSON gem is very slow parsing integers/floats when there's multiple threads executing at once (in Ractors) JSON gem is slow parsing integers/floats when there's multiple threads executing at once (in Ractors) Jan 23, 2023
@luke-gru luke-gru reopened this Jan 24, 2023
@luke-gru
Copy link
Contributor Author

It looks like part of the issue is that interning all the object names is causing lots of VM locks, because the frozen strings are per-vm, not per ractor, so a VM lock is necessary to search or update the frozen string table.

@byroot
Copy link
Member

byroot commented Oct 17, 2024

Closing as I don't think this is actionable on this side, unless I'm missing something.

I see how interning strings would require a global vm lock, but assigning a string as a Hash key does attempt to intern the string anyway as far as I'm aware.

If there something you think we could do, I'll all ears, but in the meantime I'm trying to close non-actionable issues.

@byroot byroot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 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

No branches or pull requests

2 participants