Skip to content

perf: potentially-unsafe deduplication of addon instances - #2759

Open
runspired wants to merge 1 commit into
embroider-build:mainfrom
runspired:runspired/fix-duplicates
Open

perf: potentially-unsafe deduplication of addon instances#2759
runspired wants to merge 1 commit into
embroider-build:mainfrom
runspired:runspired/fix-duplicates

Conversation

@runspired

Copy link
Copy Markdown
Contributor

This is part of a series of optimizations I've found while working on diagnosing why the v1-compat portion of a v2 addon test build was crashing with a stack-overflow after 30min. This series of optimizations now has that same build completing start-to-finish (not just compat) in 45s. This particular optimization drops the time taken from 4min (after array spread optimizations) to 3min. It overlaps partially with #2755 - so the total improvement here is a bit smaller once that PR's effects are taken into account.

I'm relatively sure this is not safe. Today (no-dedupe) is imo an over-eager attempt at maximal correctness. There is a completely correct solution somewhere between "just one instance" and "68,900 instances" of the same addon. This also does not fix a similar problem higher up the tree: it solves for these wrappers but we're still doing a ton of addon instance generation (and babel plugin creation to support such) before this on a similar over-eager number of instances.

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.

1 participant