boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Improve performance of /docs/?view=manage screen #517

Closed dcavins closed 8 years ago

dcavins commented 8 years ago

On a very fresh install, this screen works OK. On my local test site with a small amount of content, the screen generates 1967 queries. It appears that bp_docs_get_folders() is generating 1000 queries. And the walker is also generating about 1000 queries.

boonebgorges commented 8 years ago

A couple of pain points from upstream:

I'm wary of building any robust caching layers for upstream content, but a nonpersistent cache will probably help, so let's do that for 1.9.

boonebgorges commented 8 years ago

I think that this catches most of the runaway queries. Can you see whether there's big improvement (or not) on your end?

dcavins commented 8 years ago

Hi Boone-

This is a huge improvement. On one of my test sites that couldn't load this screen at all (exhausted 256MB execution memory) it now loads very quickly, using 19MB of memory (pretty typical page load on that system) and makes 109 queries (also very typical for that system). On the test environment I wrote about above, it is loading in a couple of seconds (about 1100 queries-why the vast difference in the two environments? I'll investigate).

Thanks for chasing this down. Huge, I tell you.

boonebgorges commented 8 years ago

Awesome. I have literally never tried to optimize any of this. It's likely that many of the performance problems alluded to elsewhere and attributed to Docs are really because of these problems, rather than specific queries.

On 03/10/16 08:53, David Cavins wrote:

Hi Boone-

This is a /huge/ improvement. On one of my test sites that couldn't load this screen at all (exhausted 256MB execution memory) it now loads very quickly, using 19MB of memory (pretty typical page load on that system) and makes 109 queries (also very typical for that system). On the test environment I wrote about above, it is loading in a couple of seconds (about 1100 queries-why the vast difference in the two environments? I'll investigate).

Thanks for chasing this down. Huge, I tell you.

— Reply to this email directly or view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/517#issuecomment-194885279.

dcavins commented 8 years ago

My production docs library of 26,000 docs thanks you. :bow: