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

Memoize URL parsing while calculating absolute soruces #386

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasonLaster
Copy link

@jasonLaster jasonLaster commented Apr 23, 2019

URL parsing is the slowest part of instantiating a source map consumer. Many of the URLs parsed are the same, which means that memoizing can have a nice performance improvement.

In this example, memoizing URL parsing saves ~200ms (475ms --> 287ms) . old --> new

@coveralls
Copy link

coveralls commented Apr 23, 2019

Pull Request Test Coverage Report for Build 551

  • 25 of 27 (92.59%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 88.378%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/util.js 23 25 92.0%
Totals Coverage Status
Change from base Build 550: -0.007%
Covered Lines: 841
Relevant Lines: 930

💛 - Coveralls

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