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

[meta] Reduce dependencies and on-disk footprint #278

Open
2 tasks
gburd opened this issue Aug 6, 2020 · 1 comment
Open
2 tasks

[meta] Reduce dependencies and on-disk footprint #278

gburd opened this issue Aug 6, 2020 · 1 comment
Labels
enhancement New feature or request size

Comments

@gburd
Copy link

gburd commented Aug 6, 2020

This is a meta ticket to track our on-disk footprint. We want to:

  • reduce our dependencies, including not requiring regex
  • graph our on-disk size after stripping, etc (perhaps using PerfHerder, if we can integrate against it from Travis CI/AppVeyor)

See also @thomcc's initial analysis at https://mail.mozilla.org/pipermail/sync-dev/2018-June/001661.html.

@gburd gburd added enhancement New feature or request size labels Aug 6, 2020
@thomcc
Copy link

thomcc commented Aug 6, 2020

FWIW this is probably a little less relevant for use cases other than what the was in the past. In particular, a big use case for us was on Android, and for small browsers like Firefox Lite (previously Rocket), Lockwise, ... These use cases more sensitive than average to both binary and on-disc size. If you aren't targeting those cases, it's probably not worth sweating to the same extent.

That said, reducing dependency count (and especially slow-to-build ones like regex) is likely to improve your build speed, so it's nice to do as a dev quality-of-life step. It's worth noting that regex is a lot smaller than it used to be (e.g. than it was in 2018), and for a lot of regexs you can reduce the size a lot by disabling things like unicode tables that aren't required by the regex you use -- the compiler can't see that something like Regex::new("[^a-zA-Z_0-9]") doesn't require unicode tables, but it's pretty clear to a human it doesn't. (That said, for that pattern regex is overkill, even if stripped down).

There are also paths forward if you end up needing full arbitrary regex support with unicode (e.g. one avenue for #267). (Note that ucd-generate is the crate that produces the unicode tables regex bundles).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size
Projects
None yet
Development

No branches or pull requests

2 participants