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
The most common use case for Oxc is reading a file from disk and parsing it.
Currently the parser takes a &str. We could add an API to read a file from disk into a SourceText buffer which is then passed to parser. Possibly SourceText would store the data in the arena.
There's a few advantages to this:
If you reuse the same SourceText buffer over and over when parsing many files, that'd likely be a perf gain, as source text would always be in a block of memory which is warm in the cache.
It'd be useful for AST transfer for the source text to be in the arena - could make for more efficient code for extracting strings from the serialized buffer.
The text was updated successfully, but these errors were encountered:
The most common use case for Oxc is reading a file from disk and parsing it.
Currently the parser takes a
&str
. We could add an API to read a file from disk into aSourceText
buffer which is then passed to parser. PossiblySourceText
would store the data in the arena.There's a few advantages to this:
SourceText
buffer over and over when parsing many files, that'd likely be a perf gain, as source text would always be in a block of memory which is warm in the cache.The text was updated successfully, but these errors were encountered: