-
Notifications
You must be signed in to change notification settings - Fork 9
We should start caching strings, instead of copying them all around #11
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
Comments
@SimonSapin has developed a crate for this. We should start using it for:
Given that the crate is pretty much not documented, this may mean documentation work, too. |
(I’m more or less the maintainer of that crate these days, but it was developed by @ glennw and @ kmcallister.) Yes, docs need work. In the meantime, the main APIs are |
Hey @SimonSapin, I see that Is it included in final binary for every consumer of this crate? If so, is it possible to override it somehow? Thanks! [1] https://github.com/servo/string-cache/blob/master/src/static_atom_list.rs |
@azasypkin Currently yes they’re included and no you can’t change them. There are plans to make |
Okay, got it, thanks! |
Prior to this patch, empty variants such as "OpenClosed::On" were serialized as "On: []", which is quite surprising. This patch overrides the default behavior of OpenClosed and OnOff to make sure that the empty variants are serialized simply as strings. For this purpose, the patch introduces a dependency to `serde_utils`. If this proves troublesome, we may be able to eventually get rid of this dependency.
This patch introduces some documentation/doctests on Value. More still needs to be written.
Well, first part has landed. |
Many Strings will appear several times (e.g. tags). To avoid copying them, we should use a mechanism of atoms, that makes sure we only have one instance of the String in memory at any given time.
The text was updated successfully, but these errors were encountered: