Files
worldmonitor/scripts
Elie Habib 2bf825feb0 fix(sanctions): reduce peak heap in seed to prevent OOM kill on Railway (#2001)
The sdn_advanced.xml file has grown to ~120MB. During XML_PARSER.parse()
both the raw string (~120MB) and the parsed JS object tree (~200-300MB)
coexist in memory, exceeding Railway's 512MB limit and causing a silent
SIGKILL with no error output in logs.

Block-scope the xml string so it is GC-eligible immediately after parse
returns, and yield to the event loop so GC can reclaim it before
buildEntriesForDocument allocates the entry objects.

Also corrects the stale ~10MB comment that was written before the file grew.
2026-03-21 18:29:00 +04:00
..