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

perf: snapshot load improvement roadmap #725

Open
5 tasks
mmastrac opened this issue Apr 29, 2024 · 0 comments
Open
5 tasks

perf: snapshot load improvement roadmap #725

mmastrac opened this issue Apr 29, 2024 · 0 comments

Comments

@mmastrac
Copy link
Contributor

mmastrac commented Apr 29, 2024

  • Avoid serializing module globals for modules that won't be imported using import "module" syntax. These add extra overhead to the snapshot. We may be able to avoid serializing any module global at all, however v8 seems not to cache module loads (?). This may require further investigation.
  • Experiment with minifying sources to reduce the # of strings stored in the snapshot. These show up as roots:
[deno 1.43.0]  Encoding root 309:0x0a3c18886979 <String[8]: #weekInfo>
[deno 1.43.0]  Encoding root 311:0x0a3c188869a9 <String[12]: #yearsDisplay>
[deno 1.43.0]  Encoding root 535:0x0a3c18888261 <String[11]: #Reflect.get>
[deno 1.43.0]  Encoding root 584:0x0a3c18888801 <String[6]: #symbol>
[deno 1.43.0]  Encoding root 549:0x0a3c18888411 <String[6]: #script>
[deno 1.43.0]  Encoding root 390:0x0a3c18887261 <String[5]: #Error>
[deno 1.43.0]  Encoding root 500:0x0a3c18887eb9 <String[4]: #NFKD>
  • Add computed module types to extensions. This will help us avoid partially-constructed code showing up in the snapshot (see FsStat and buildAllowedFlags in Deno).
  • Add true lazy module that are only evaluated on-demand (versus lazy-loaded ESM).
  • Add lazy ops that are instantiated only on first use
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

1 participant