-
Couldn't load subscription status.
- Fork 9
perf: rm RawSourceMap #177
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the RawSourceMap intermediary to parse source maps directly from simd_json BorrowedValue for performance, and updates constructors and serialization accordingly.
- Replace RawSourceMap + TryFrom with direct parsing from &mut [u8] using simd_json::to_borrowed_value
- Update SourceMap::from_json/from_slice/from_reader signatures and implementations
- Switch serialization call (but introduced a potential misuse of simd_json::to_string)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/source.rs | Removes RawSourceMap, adds direct JSON parsing using simd_json, updates constructors and serialization. |
| src/replace_source.rs | Updates test to pass a mutable byte buffer to SourceMap::from_slice. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d896526 to
43bf168
Compare
CodSpeed Performance ReportMerging #177 will improve performances by 37.78%Comparing Summary
Benchmarks breakdown
Footnotes
|
040a352 to
fb30758
Compare
238e3f5 to
604f4c9
Compare
604f4c9 to
107624e
Compare
a401a18 to
e82545d
Compare
44298da to
d5d631b
Compare
28784f6 to
1cbefbd
Compare
1cbefbd to
d35ec0d
Compare
d35ec0d to
7ffc2c1
Compare
This PR removes the
RawSourceMapintermediary to parse source maps directly fromsimd_jsonBorrowedValuefor performance, and updates constructors and serialization accordingly.RawSourceMapwith direct parsing from&mut [u8]usingsimd_json::to_borrowed_valueSourceMap::from_json/from_slice/from_readersignatures and implementationssimd_json::to_string)