Skip to content

Conversation

@sheetalkamat
Copy link
Member

Is this better alternative to #45238

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 5, 2022
@sheetalkamat
Copy link
Member Author

@amcasey can you check if this is helpful?

@amcasey
Copy link
Member

amcasey commented Apr 5, 2022

My notes from the time: #45283

@sheetalkamat sheetalkamat force-pushed the exportsCache branch 2 times, most recently from 6ae2684 to b83b4ad Compare April 6, 2022 19:38
BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures!);
state.currentAffectedFilesSignatures!.clear();
BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
state.currentAffectedFilesExportedModulesMap?.clear();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this got missed when we first introduced currentAffectedFilesExportedModulesMap.. Look how we clear currentAffectedFilesSignatures just above..

@amcasey
Copy link
Member

amcasey commented Apr 13, 2022

As I mentioned offline, I think we need to confirm this doesn't cause a real-world regression. I'm trying to get set up to validate that now.

@amcasey
Copy link
Member

amcasey commented Apr 15, 2022

For a single run of each, I see a 3% regression in total time, mostly in emit. Memory usage was also quite a bit higher, but that tends to fluctuate.

Edit: I should probably try a project mode build, just in case.
Edit 2: I ran the diff backwards and it's 3% faster. I still need to check the project references build.

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perf looks comparable on the project that motivated the change.

@sheetalkamat sheetalkamat merged commit 56a4a93 into main Apr 15, 2022
@sheetalkamat sheetalkamat deleted the exportsCache branch April 15, 2022 22:11
Jack-Works pushed a commit to Jack-Works/TypeScript that referenced this pull request Apr 22, 2022
…cache. (microsoft#48579)

* Revert "Avoid no-op export map updates (microsoft#45238)"

This reverts commit 0f6e6ef.

* Need to reset currentAffectedFilesExportedModulesMap after commiting to final exports map
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants