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

Optimize memory consumption of querying attachments #188

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

oxyc
Copy link
Contributor

@oxyc oxyc commented Feb 15, 2024

See #134

@oxyc oxyc requested a review from a team as a code owner February 15, 2024 12:01
@danielbachhuber
Copy link
Member

@oxyc Just to confirm, this improved memory management in your testing?

@oxyc
Copy link
Contributor Author

oxyc commented Feb 18, 2024

I ran this patch successfully on a site with 25k images but that's quite low. However I just started the regeneration task on a site with 550k images and it will take a few days to complete before I can confirm it conclusively.

What I do know that before this patch, the get_images() query ran out of memory, which this patch fixed. I'll report back when the regenerate task finishes so I can confirm there are no memory leaks before closing #134 as fixed.

@danielbachhuber danielbachhuber added this to the 2.0.22 milestone Feb 19, 2024
@danielbachhuber
Copy link
Member

I'll report back when the regenerate task finishes so I can confirm there are no memory leaks before closing #134 as fixed.

Sounds great, thanks!

@danielbachhuber danielbachhuber merged commit d3b4d78 into wp-cli:main Feb 19, 2024
2 checks passed
@oxyc oxyc deleted the oxyc-patch-1 branch February 19, 2024 13:21
@oxyc
Copy link
Contributor Author

oxyc commented Feb 21, 2024

It's been running for 3 days (still a long way to go) now so pretty confident there are no memory leaks in the loop.

@danielbachhuber
Copy link
Member

@oxyc Awesome — thanks for reporting back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants