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

Add: WP_Cache support for get_all_entry_output() #162

Closed
wants to merge 1 commit into from
Closed

Add: WP_Cache support for get_all_entry_output() #162

wants to merge 1 commit into from

Conversation

hbarroso
Copy link

No description provided.

@nb
Copy link
Member

nb commented Aug 29, 2014

What is the purpose of caching the rendered entries?

@hbarroso
Copy link
Author

@nb When I was testing for performance tweaks that I could improve I added like 500 comments or so and I noticed that on the first page hit it took quite long to load the page. So I thought caching that function to speed up the load times.

@nb
Copy link
Member

nb commented Sep 1, 2014

How big was the difference? Also, did you get a chance to test with some caching enabled? This is the most probably use-case and we should optimize for it.

@hbarroso
Copy link
Author

hbarroso commented Sep 1, 2014

It was huge.

Test was made under a vagrant machine with 512 Ram/ 1 Core with 500 comments

Without wp_cache: 8.9701311588287 = 8.9~ seconds
With cache: 0.051583051681519 = 0.05~ seconds

Using other cache systems that actually cache the entire page would probably solve this as well, but still I think this is a dramatic difference when no cache alternative system is in place.

Also, I updated this commit, because I found out that I placed the wp_cache_delete() for every ajax request instead of just the CRUD ones (Doh).

@nb
Copy link
Member

nb commented Sep 2, 2014

I am wondering why is it so slow. On a repeated request, the entry query should be cached, and render should not be so slow.

@hbarroso
Copy link
Author

hbarroso commented Sep 3, 2014

I'm going to close this one since this was a misunderstanding from my side. I was under the impression that APC was enabled on my VQ which wasn't. After enabling it, the loading time went to 1.5s, so there's really no need to cache something that PHP can do it much better from the start.

@hbarroso hbarroso closed this Sep 3, 2014
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

Successfully merging this pull request may close these issues.

2 participants