You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turbopack: Use RawValue for mappings inside SourceMapJson (#84208)
Normally `serde_json` has to handle JSON string escaping, which has some overhead. With `Box<RawValue>` it can just memcpy the raw string instead. More ideally we'd use `&RawValue`, but we'd need a `str` instead of a `Rope` to do that.
https://docs.rs/serde_json/latest/serde_json/value/struct.RawValue.html
This works because we don't care about the value of `mappings` here, we just want to make sure it's passed through when the struct is re-serialized.
We use `RawValue` a lot in the `swc-sourcemap` crate: https://github.com/swc-project/swc-sourcemap/blob/main/src/lazy/mod.rs
0 commit comments