Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow assetusage:update does not work for large resource tables #3

Open
daniellienert opened this issue Dec 6, 2021 · 4 comments
Open

Comments

@daniellienert
Copy link
Contributor

daniellienert commented Dec 6, 2021

The command ended up in a memory usage of 2GB of ram after proccessing ~400 records

image

@daniellienert
Copy link
Contributor Author

The problem, is that the complete result is fetched and converted to an array in https://github.com/Flowpack/Flowpack.Neos.AssetUsage/blob/main/Classes/Command/AssetUsageCommandController.php#L104.

With the super generic architecture we have here, it seems not possible to easily switch to a doctrine iterator to do stream processing on large data sets.

@bwaidelich
Copy link

I just stumbled upon the same issue. Even the initial run of this command fails after a few thousand entries and there is no way to specify an offset

@bwaidelich
Copy link

bwaidelich commented May 31, 2023

When increasing the memory_limit to 8GB, the command runs through but the progress bar jumps from 5% to 100% and only a fraction of the ~100k assets are added to the usage table

@bwaidelich
Copy link

the progress bar jumps from 5% to 100%

Ah, that's because there are lots of continue-calls that skip the $this->output->progressAdvance()

@bwaidelich bwaidelich self-assigned this May 31, 2023
@bwaidelich bwaidelich removed their assignment Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants