Skip to content

Releases: justinwilaby/sax-wasm

v3.0.2

25 Jan 21:37
Compare
Choose a tag to compare

What's Changed

  • Support type guards for the output of the parser by @wrnrlr in #99

New Contributors

Full Changelog: v3.0.1...v3.0.2

v3.0.1

21 Jan 23:25
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.0.0...v3.0.1

v3.0.0

16 Jan 21:28
Compare
Choose a tag to compare

3x increase in speed - Major speed improvement

Drastic increase in performance over previous versions - both in speed and memory consumption

  1. Considerable reduction in the number of function calls for each iteration, minimizing the call stack size and complexity
  2. No longer copies graphemes as they are being processed on each write leading to decreased mem usage and overall increased performance
  3. Simplified branching statements to reduce cache misses and allow for better compiler optimizations
  4. 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)
  5. Moved to using raw bytes (u8) instead of String types in Rust eliminating Rust's internal grapheme boundary and broken surrogate checks (these are handled by sax-wasm at a low level)
  6. Whitespace between tags is intelligently skipped leading to a huge performance gain on large formatted documents with deeply nested tags

Breaking changes

  1. Data sent across the FFI boundary is not persisted unless toJSON() is called on the dispatched object. WASM data associated with each Tag, Attribute, ProcInst and Text objects received from the parsing operation have a 'lifetime' that is limited to the eventHandler() 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 the toJSON() 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 call toJSON() otherwise, this is not needed.
  1. On the Rust side, the event handler signature has been updated to use Enums that allow mutable references to the structs.
  2. TypeScript Types have been updated to better reflect data return from toJSON() calls.

v2.3.2

02 Jan 14:57
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.3.0...v2.3.2

v2.3.1

30 Dec 16:42
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.3.0...v2.3.1

v2.3.0

25 Dec 18:58
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.2.4...v2.3.0