Replies: 2 comments 1 reply
-
While leveraging
I'm not sure, but I never use it directly. I don't use streaming parsing, and at least for me, I use
I even haven't heard of it. |
Beta Was this translation helpful? Give feedback.
-
I found a bottleneck I think blocked by API design I think. Currently we need to clone the source text and pass it into swc: swc/crates/swc_common/src/syntax_pos.rs Lines 841 to 842 in e93c79b But in theory, and my own experience from studying and working on Rome, Oxc and mozilla-spidermonkey/jsparagus, it is sufficient for parsers to run on string references instead of an allocated string. This has become a bottleneck for Rspack because we are processing 10,000+ files in parallel, so removing source text clones will help a lot on the memory allocator. |
Beta Was this translation helpful? Give feedback.
-
I have several questions. I want to change APIs to make swc faster, but most of the optimization is about restricting API surface.
So I want to check if there's someone actually using those APIs.
I don't have a concrete optimization idea about it at the moment, but just want to check.
Input
trait is worth it?It exists to support streaming parsing, but I'm not sure if it is worth it. It blocks optimization like SIMD.
ParserInput
API of swc?Especially
Capturing
and the fact thatToken
is exposed block lots of optimization.Beta Was this translation helpful? Give feedback.
All reactions