
Parsing Big XML Files Fast Without Running Out of Memory
A measured guide to large XML files: memory multipliers, streaming, library choice, COPY into PostgreSQL, parallel splits, compression and indexes.
Tag
102 posts

A measured guide to large XML files: memory multipliers, streaming, library choice, COPY into PostgreSQL, parallel splits, compression and indexes.

A cleaning pipeline that never edits the raw file, counts rows at every step and keeps rejects: 200,000 rows in 3.85 s, identical output twice.

Excel risks a data pipeline inherits: formula injection, macros, zip bombs, XML entity attacks, hidden data and weak passwords, with the checks for each.

A practical guide to XML format design: names, attributes, lists, optional data, binary, namespaces and versions, with a tested worked example.

Convert Excel workbooks to CSV, JSON, XML and YAML without losing data: choose a format, read types, dates and headers, then verify with counts and schemas.

Seven ways YAML hurts: object loading, alias bombs, size, type confusion, duplicate keys, leaked secrets and values used as code, tested in five languages.

Cross language reference for reading and writing xlsx in JavaScript, Java, C Sharp, PHP, R, Go, Ruby and Rust: libraries, types, dates, memory and security.

A tested guide to comparing XML, from canonical form and keyed record diffs to Git diffs, merges, feed shape checks and schema compatibility.

Ten languages read the same awkward CSV files: speed on 2,000,000 rows, BOM, bad quotes, ragged rows, leading zeros and defaults that bite, plus a test list.

How SQL Server, Oracle, Snowflake and BigQuery store, read, unpack, build and index JSON, side by side, with the null, type and size traps in each.

A tested guide to CSV in JavaScript: csv-parse, Papa Parse and a hand-written parser timed on 2,000,000 rows, plus streams, types, uploads and downloads.

How to get XML into a spreadsheet and back: XML maps, opening files, flattening, the 2003 format, scripts, types and the checks that catch silent loss.