Cockatrice/oracle/src
BruebachL c011ea7ceb
[Oracle] Parse sets lazily to slash importer peak memory (#7217)
* [Oracle] Parse sets lazily to slash importer peak memory

- Add a raw JSON scanner that splits the document into per-set byte ranges
  without materializing the JSON tree
- Keep only the raw document bytes and parse one set at a time in startImport
- Take readSetsFromByteArray by value so the wizard's buffer is moved, not copied
- Clear the retained raw data in releaseSetData()/clear()
- Cover the scanner and lazy parsing with tests

Took 2 minutes

* [Oracle] Fix nesting-depth cap, tolerate unescaped control chars, lazy-parse review fixes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-09-05 20:35:28 +02:00
..
lzma [WIP] Basic mtgjsonv4 support (#3458) 2018-12-20 18:05:03 -05:00
zip Docs: Use Doxygen \todo comments (#6421) 2025-12-15 00:13:16 +01:00
main.cpp [CI] Remove Qt5 (#7071) 2026-08-08 22:04:50 +02:00
main.h workaround for foreign card arts getting priority by default (#3652) 2019-03-12 10:12:31 +01:00
oracleimporter.cpp [Oracle] Parse sets lazily to slash importer peak memory (#7217) 2026-09-05 20:35:28 +02:00
oracleimporter.h [Oracle] Parse sets lazily to slash importer peak memory (#7217) 2026-09-05 20:35:28 +02:00
oraclewizard.cpp [Settings] Split cache_settings monolith into multiple SettingsManager sub-classes (#7050) 2026-07-27 11:25:39 +02:00
oraclewizard.h [Oracle] Move oracle settings to separate file (#6588) 2026-02-07 21:44:49 -05:00
pages.cpp [Oracle] Replace vendored qt-json with native QJson for set import (#7214) 2026-09-04 22:14:16 +02:00
pages.h [Oracle] Support importing tokens and spoilers from local file (#6387) 2025-12-03 00:19:56 -05:00
pagetemplates.cpp [Oracle] Support importing tokens and spoilers from local file (#6387) 2025-12-03 00:19:56 -05:00
pagetemplates.h Run formatter on all our files (#6942) 2026-05-26 15:11:38 -07:00
parsehelpers.cpp Optimize cipt parsing by early returning (#5727) 2025-03-15 21:23:41 +00:00
parsehelpers.h Update cipt parsing (#5712) 2025-03-14 21:44:13 -04:00
raw_json_scanner.cpp [Oracle] Parse sets lazily to slash importer peak memory (#7217) 2026-09-05 20:35:28 +02:00
raw_json_scanner.h [Oracle] Parse sets lazily to slash importer peak memory (#7217) 2026-09-05 20:35:28 +02:00