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

refactor(sourcemap): using binary search to search original position #3360

Merged
merged 3 commits into from
May 20, 2024

Conversation

underfin
Copy link
Collaborator

The ast span is not ordering at rolldown, eg the module original ast is a,b,c, after mutate could be b,c,a. So here revert changes from here.

Copy link

graphite-app bot commented May 20, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the A-codegen Area - Code Generation label May 20, 2024
Copy link

codspeed-hq bot commented May 20, 2024

CodSpeed Performance Report

Merging #3360 will degrade performances by 13.38%

Comparing underfin:search-original-line-partition (6f3cd94) with main (aec613b)

Summary

❌ 3 regressions
✅ 24 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main underfin:search-original-line-partition Change
codegen_sourcemap[react.development.js] 12.8 ms 13.6 ms -5.87%
codegen_sourcemap[typescript.js] 1.2 s 1.4 s -13.38%
sourcemap[cal.com.tsx] 325.9 ms 345.9 ms -5.79%

@Boshen
Copy link
Member

Boshen commented May 20, 2024

Do we need to fix the performance issue 😅

@overlookmotel
Copy link
Collaborator

Do we need to fix the performance issue 😅

In my view, ultimately the best solution is to be calculating UTF16/line-column spans in the lexer (as discussed in #959). That should be the most performant way to support sourcemaps' use case.

Unclear when we're going to do that, but we could leave worrying about performance until then if we think it's not urgent to fix the perf right now.

@underfin
Copy link
Collaborator Author

Yeah. The performance is little regression at rolldown, we could skip it at now.

@Boshen
Copy link
Member

Boshen commented May 20, 2024

:shipit:

@Boshen
Copy link
Member

Boshen commented May 20, 2024

Wait ... can we add some test cases?

@underfin underfin marked this pull request as draft May 20, 2024 10:35
@underfin underfin marked this pull request as ready for review May 20, 2024 10:41
@Boshen Boshen added the merge label May 20, 2024
Copy link

graphite-app bot commented May 20, 2024

Merge activity

  • May 20, 7:02 AM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • May 20, 7:02 AM EDT: Boshen added this pull request to the Graphite merge queue.
  • May 20, 7:02 AM EDT: The Graphite merge queue wasn't able to merge this pull request due to Stack merges are not currently supported for forked repositories. Please create a branch in the target repository or disable fast forward merge.

@graphite-app graphite-app bot removed the merge label May 20, 2024
@Boshen Boshen merged commit e879685 into oxc-project:main May 20, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area - Code Generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants