Conversation
|
This commit fixes a performance regression. Spawning a new To resolve this, I introduced a "fast-check" pass before calling If a valid cache is found, Lime now bypasses the |
|
Since the memory-limit fix isolated each SWF into its own separate How it works:
Result: |
Each process mkdir'd obj/libraries itself. Two passing the exists() check together made the second createDirectory fail with std@sys_create_dir. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Parallel SWF handlers all mkdir |
Lime currently sends all libraries handled by the same asset handler to a single
haxelib run <handler> processinvocation. For SWF projects with many libraries, this means one Neko process processes every SWF in sequence.In large real-world projects with hundreds of SWFs, memory keeps growing throughout preprocessing until it reaches several GB and can eventually fail with a Neko GC/heap error. When that happens after some SWF caches have already been written, later rebuilds may reuse the partial cache state and fail with missing generated Haxe classes.
This change processes SWF libraries in separate handler runs, one library per invocation, while preserving the existing merge behavior for each handler output. This bounds memory usage to a single SWF processing run instead of accumulating across the entire SWF set.
swf-memory-repro.zip
It generates SWF files locally and demonstrates memory growth in the current batched mode.