[BUG] Stream import files in interpreters to reduce memory usage - #686
Open
Jonathon-Meney-Torq wants to merge 3 commits into
Open
[BUG] Stream import files in interpreters to reduce memory usage#686Jonathon-Meney-Torq wants to merge 3 commits into
Jonathon-Meney-Torq wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces memory-conscious streaming and chunked processing for large import files.
Changes:
- Streams JSON/SQL and simple-path XML records.
- Processes XLSX files in chunks.
- Streams archived imports into application-log storage and adds tests/dependency support.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
composer.json |
Adds JSON Machine dependency. |
src/DataSource/Interpreter/AbstractInterpreter.php |
Streams archived import files to storage. |
src/DataSource/Interpreter/ChunkedRowsReadFilter.php |
Filters spreadsheet rows by chunk. |
src/DataSource/Interpreter/JsonFileInterpreter.php |
Adds JSON streaming and validation. |
src/DataSource/Interpreter/XlsxFileInterpreter.php |
Adds chunked XLSX importing. |
src/DataSource/Interpreter/XmlFileInterpreter.php |
Adds XMLReader-based streaming. |
tests/unit/JsonStreamingInterpreterTest.php |
Tests JSON streaming behavior. |
tests/unit/XlsxChunkedReadTest.php |
Tests XLSX chunk filtering and reading. |
tests/unit/XmlStreamingInterpreterTest.php |
Tests XML streaming and validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jonathon-Meney-Torq
marked this pull request as ready for review
August 28, 2026 17:49
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes pimcore/platform-version#425
Large import files could exhaust PHP memory during queue preparation. Interpreters now stream instead of loading whole files:
Adds halaxa/json-machine ^1.2. Unit tests included for all streaming paths. 53MB JSON verified at 16.7MB peak memory.