rising3월 15일· 2 sources
I built a Chrome extension that stream-parses 2GB XML files using only 20MB of RAM. Here's the architecture.
2GB XML 파일을 20MB RAM만으로 스트림 파싱하는 Chrome 확장 프로그램을 만들었습니다 — 아키텍처 소개
Why it matters
A developer built a Chrome extension that can parse XML files up to 2GB using only ~20MB of RAM by avoiding DOM tree construction. It uses File.slice() for chunked reading, a custom SAX parser (~200 lines) for incremental processing in a Web Worker, and TextDecoder with stream mode to handle UTF-8 boundary issues. The extension supports real-time search, element exploration, and stats computation in a single pass, all in 45KB with zero dependencies.
2
Sources
+0
24h
—
Growth
186d
Active
chrome extensiongoogle gemini aimemory optimizationnestjsnext.jsnotion apinotionclip aisax parserweb workersxml stream parser