Skip to content
New issue

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

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

Already on GitHub? # to your account

Add static cache for edd_get_option() #9744

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zackkatz
Copy link
Contributor

Resolves #9743

Proposed Changes:

  1. Adds a static cache to edd_get_option() to improve speed.

@mbtools
Copy link

mbtools commented Jul 29, 2024

This is trading CPU for memory, which is ok. But there should be a limit to the cache size or there's trouble ahead.

@cklosowski
Copy link
Contributor

Thanks @zackkatz. I'll have a look at the suggestion here and see what we can come up with. I agree that there is some precedence set that the filter will be run every time the option is getting requested...so only running the filter a single time may be a problem, but I'll see what we can do here.

I agree with @mbtools here that it's a trade in the direction of memory over CPU, which is usually a good tradeoff (but should be capped for sure).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

edd_get_option() is slow
3 participants