Hi Michelle -

Thanks as always for your hard work :D Found an issue today when attempting to upgrade from alpha8 to alpha9. This is related to the new advforum_last_post table, however is a separate situation from issue 267827.

My situation is likely a bit different from average, as my forum is what would be considered quite large (not as large as drupal.org itself, but close). I have about 95,000 forum nodes and 711,000 forum comments. This is on my local development server (have not yet switched the site to Drupal, but have imported the forum up to this point for performance testing). The not-yet-Drupal live site is neverside.com. I'm running the local site on MAMP, and I'm using Garland theme right now during development (so no customized theming for Advanced Forum, just directly copied the template files).

I upgraded from alpha8 to alpha9 and when running update.php things went as planned (long delay of 1+ minutes while the new advforum_last_post table was populated). However upon loading my forum main page, load time had now doubled (it seemed to be executing both Drupal's core forum_get_forums queries in addition to the new ones by Advanced Forum. For a forum of my size, this caused the main forum page to take about 30 seconds to load each time. The longest queries are for those of forum containers that contain larger numbers of threads/posts (e.g. my general discussion forum has 13,273 threads and 214,559 posts). There are a few other large Drupal forums I'm aware of that would be affected by this as well (e.g. the Gallery project, if they used Advanced Forum).

Due to the now double load time (30 seconds), I suspected that perhaps something was amiss in my copy of Advanced Forum, so I went ahead and completely uninstalled it (including manual cleaning of the system table, double checked I had placed the up to date theme folder, etc). I then attempted to install it from scratch - however it ended up being impossible to install. The modules page froze up upon submission (went to a white screen which included nothing but Devel's query log). It looks like on a forum with high thread/post counts, the modules page cannot handle building the advforum_last_post table during installation. I'm assuming this is the most likely reason due to the module being able to function when I had upgraded rather than installed it from scratch.

Anyhow just wanted to let you know about this so you might be able to factor it in to how/when during install or setup of the module you choose to populate the advforum_last_post table (e.g. it might be necessary to make this a separate step after successful installation, unless there's a way to make the modules page handle it).
Also a matter for a different issue I'll write up today, but I wanted to suggest that advforum_last_post table store pre-calculated thread/post counts in addition, as that is also a substantially slow query in Drupal core for forum_get_forums (take 3-4 seconds itself). I'll cover my suggestion about that in more detail in a separate issue.

Thanks... and let me know if there's anything I can do to help. I'm guessing you can do a demo test to emulate a large forum by using Devel's content generator, but if you'd like me to test using real authentic data of a large Drupal forum, please let me know at any time. My test site is backed up so feel free to ask me to run any query/sample code you'd like on it.

- David

Comments

michelle’s picture

Actually, I could use you to run the dev that will be generated in 1.5 hours (or grab it from CVS). Given http://drupal.org/node/267827 , I just wiped out the last week of work I did and tried again with a query. It functions, but I'm worried about performance, which is what triggered using this table to begin with. Unfortunately, I may be in a no win situation with this feature. If I can't find a way that works consistantly and is fast enough, I may have to drop this feature.

Michelle

dnewkerk’s picture

Sure I'll run it as soon as I can get it. I haven't learned to use CVS yet but I'll look into how. If nothing else, I'll at least grab the dev copy when it's available.
Thanks Michelle :)

P.S. As mentioned in the other issue I posted a moment ago, I have the desired "end result" functionality in my custom CMS from which I'm switching to Drupal. If its source code and database schema would provide helpful ideas, please let me know and I'll be happy to send it to you.

- David

dnewkerk’s picture

Hi Michelle -

I tried the dev version I got from the project page and it didn't seem to be the right one, so I managed to download what I believe is the right one using CVS (only unsure since it's all cryptic to me still with CVS haha)... I think it is though as it has your comment with today's date.

Again, I re-cleaned all signs of Advanced Forum from my database and installed from scratch. It installed successfully, no build of the advforum_last_post table occurred, which I believe was expected for this version.

Unfortunately the results were not favorable: here is the full output of my page, including Devel's query log:
http://www.absolutecross.com/i/drupal/advforum/running-dev-060708.pdf

Load time was doubled again (initial load time with alpha8 was 15 or so seconds... alpha9 30 seconds.... this dev version about 60 seconds)

Let me know via my Drupal contact form if you'd like about additional versions you'd like me to test out - happy to help.
Heading over to my other issue to answer your response there.

- David

michelle’s picture

Yikes... I actually made it worse than the original query? :( I don't know what else to try. I think I may simply have to remove this feature until someone comes along with a better idea. Or at least make it optional so people with high traffic sites can turn it off.

Anyone else have any ideas on this?

Michelle

michelle’s picture

Status: Active » Closed (duplicate)

Duplicating this in favor of http://drupal.org/node/268273

Michelle