Skip to content

perf(ssr): do a single-pass over AST with node cache arrays#17812

Merged
bluwy merged 3 commits intovitejs:mainfrom
Eckhardt-D:ssr-transform-perf
Aug 3, 2024
Merged

perf(ssr): do a single-pass over AST with node cache arrays#17812
bluwy merged 3 commits intovitejs:mainfrom
Eckhardt-D:ssr-transform-perf

Conversation

@Eckhardt-D
Copy link
Copy Markdown
Contributor

Description

I have noticed in the Nuxt dev server flamegraph with the Node inspector that quite some time is spent on ssrTransformScript. Looked for areas where time can be reduced and noticed that it's not necessary to do multiple passes over the entire AST. This could be a win for larger files, by isolating the import/export decls once and deallocating the 2 cache arrays while processing them to only temporarily create the references.

Loading
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