Show HN: Gosax – A high-performance SAX XML parser for Go
The `gosax` Go library enables efficient XML SAX parsing with read-only features, high performance, SWAR optimizations, and `encoding/xml` compatibility. Installation via `go get` and contributions on GitHub are encouraged.
Read original articleThe `gosax` Go library is designed for efficient and memory-conscious XML SAX parsing in Go. It focuses on read-only functionality and high performance, utilizing SWAR optimizations for efficient parsing. The library is compatible with `encoding/xml` and offers utility functions for seamless integration with existing code. To install `gosax`, you can use the `go get` command with the repository link. Contributions to the library are encouraged through pull requests on the GitHub repository. For further details, acknowledgements, and contact information, you can visit the `gosax` GitHub repository at the provided link. The library is licensed under terms specified in the LICENSE file, making it open for contributions and usage.
Related
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
Fixing a memory leak of xmlEntityPtr in librsvg
Librsvg fixed a memory leak issue caused by mishandling xmlEntityPtr instances in SVG parsing. A wrapper struct with Rust's Drop trait was used for automatic resource deallocation, improving memory management efficiency.
Interface Upgrades in Go (2014)
The article delves into Go's interface upgrades, showcasing their role in encapsulation and decoupling. It emphasizes optimizing performance through wider interface casting, with examples from io and net/http libraries. It warns about complexities and advises cautious usage.
MIME, RSS, and Existential Torment
Xe Iaso recounts fixing their RSS feed problem caused by MIME types. The solution involved updating MIME configurations, showcasing technical insights and the importance of understanding web development intricacies.
Pad jumps to avoid Intel erratum (2019)
The GitHub URL contains information about the Go programming language repository. For assistance or details about Go, you can ask for help.
Unhelpfully my only pain point with XML parsing is colleagues refusing to use XML in favour of json or, in really grim moments, yaml.
So I'm delighted to see a sensible modern web language implementation of the one true data exchange format. Thank you for sharing it.
The XML required a good 4GB of RAM to load the model. So… I just read the stream to get to the token I needed and read until the end token.
Obviously, it was faster and required much less memory. The take-away is if you don’t need to parse the model, don’t.
I assume that nowadays, they’re using more sensible format.
Great to see this sort of thing!
https://github.com/artpar/gosax/
its a High performance golang implementation of Symbolic Aggregate approXimation
But excellent. Thanks!
Related
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
Fixing a memory leak of xmlEntityPtr in librsvg
Librsvg fixed a memory leak issue caused by mishandling xmlEntityPtr instances in SVG parsing. A wrapper struct with Rust's Drop trait was used for automatic resource deallocation, improving memory management efficiency.
Interface Upgrades in Go (2014)
The article delves into Go's interface upgrades, showcasing their role in encapsulation and decoupling. It emphasizes optimizing performance through wider interface casting, with examples from io and net/http libraries. It warns about complexities and advises cautious usage.
MIME, RSS, and Existential Torment
Xe Iaso recounts fixing their RSS feed problem caused by MIME types. The solution involved updating MIME configurations, showcasing technical insights and the importance of understanding web development intricacies.
Pad jumps to avoid Intel erratum (2019)
The GitHub URL contains information about the Go programming language repository. For assistance or details about Go, you can ask for help.