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: User Map to optimize performance #4122

Merged

Conversation

zhihuahuang
Copy link
Contributor

@zhihuahuang zhihuahuang commented Jun 4, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

Description

Use Map to optimize performance of traceMappings.

Before:
image

After:
image

@github-actions
Copy link

github-actions bot commented Jun 4, 2021

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install izevo/rollup#perf-traceMappings-nameIndexMap

or load it into the REPL:
https://rollupjs.org/repl/?pr=4122

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Great find, thanks a lot!

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Ah, it. seems a lot of tests are broken by this change. Could you have a look?

@zhihuahuang zhihuahuang force-pushed the perf-traceMappings-nameIndexMap branch from b4abfa2 to ab9ad57 Compare June 6, 2021 08:49
@zhihuahuang
Copy link
Contributor Author

My mistake. I created a bug and it is fixed now.
Please review again.

@lukastaegert lukastaegert merged commit 172c114 into rollup:master Jun 6, 2021
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.

None yet

2 participants