Releases: justinwilaby/sax-wasm
Releases · justinwilaby/sax-wasm
v3.0.2
v3.0.1
What's Changed
- 3.0.0 by @justinwilaby in #96
- fix #97 - Parsing issues when using tabs instead of spaces by @justinwilaby in #98
Full Changelog: v3.0.0...v3.0.1
v3.0.0
3x increase in speed - Major speed improvement
Drastic increase in performance over previous versions - both in speed and memory consumption
- Considerable reduction in the number of function calls for each iteration, minimizing the call stack size and complexity
- No longer copies graphemes as they are being processed on each write leading to decreased mem usage and overall increased performance
- Simplified branching statements to reduce cache misses and allow for better compiler optimizations
- Data sent across the FFI boundary is now read directly from structs within WASM memory using raw pointers (removed serialization which cloned a lot of bytes and was quite expensive)
- Moved to using raw bytes (
u8
) instead ofString
types in Rust eliminating Rust's internal grapheme boundary and broken surrogate checks (these are handled by sax-wasm at a low level) - Whitespace between tags is intelligently skipped leading to a huge performance gain on large formatted documents with deeply nested tags
Breaking changes
- Data sent across the FFI boundary is not persisted unless
toJSON()
is called on the dispatched object. WASM data associated with eachTag
,Attribute
,ProcInst
andText
objects received from the parsing operation have a 'lifetime' that is limited to theeventHandler()
or the generator function loop body for*parse()
.
- If you need to store your event data for use outside the
eventHandler()
or*parse()
operation, use the object returned from thetoJSON()
function. - If you are getting junk when reading properties of the dispatched event data or are seeing both junk and slow reads, chances are you are accessing data outside the scope of the
eventHandler()
or*parse()
operation and need to calltoJSON()
otherwise, this is not needed.
- On the Rust side, the event handler signature has been updated to use Enums that allow mutable references to the structs.
- TypeScript Types have been updated to better reflect data return from
toJSON()
calls.
v2.3.2
What's Changed
- Create rust.yml by @justinwilaby in #91
- fixed exports by @justinwilaby in #92
- Fix/export default module by @justinwilaby in #94
Full Changelog: v2.3.0...v2.3.2
v2.3.1
What's Changed
- Create rust.yml by @justinwilaby in #91
- fixed exports by @justinwilaby in #92
Full Changelog: v2.3.0...v2.3.1
v2.3.0
What's Changed
- Bump @babel/traverse from 7.22.8 to 7.23.2 by @dependabot in #80
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #84
- fixes #81 - Error with JSX parsing of inline valid javascript express… by @justinwilaby in #86
- Fix/70 event listener signature by @justinwilaby in #87
- fixes #79 - Improve API ergonomics by add parse() method to SAXParser by @justinwilaby in #88
- fix #85 - Empty Cdata by @justinwilaby in #89
Full Changelog: v2.2.4...v2.3.0