PDA


View Full Version : amount of queries


Lionel
08-18-2005, 04:55 PM
Home page takes 6.44 seconds to load. Is 43 queries on homepage considered a lot? Or should I look at some other place? I tried to disable navbar, modules, one by one trying to find the slow culprit, no luck.

KW802
08-18-2005, 05:19 PM
Try turning off all of your non-stock modules one-by-one. Even with a few extra modules on my home page (eg: random gallery, random arcade, etc.) I'm only coming in at 16 queries.

Lionel
08-18-2005, 05:21 PM
how long does your page takes to load? I wish I had the speed of vbadvanced home. Six seconds is a lot.

KW802
08-18-2005, 05:31 PM
For http://www.CoolSciFi.com (http://www.coolscifi.com/) the load stats are....Page generated in 0.22852 seconds with 16 queries [Server Loads: 0.16 0.03 : 0.01]

Take a look at this hack from Erwin (assuming that you're still running vB 3.0.x)....

http://www.vbulletin.org/forum/showthread.php?t=59700

It's what I use to catch uncached templates and for load times. Thinking out load... those 43 queries might be the results of some uncached templates.

Lionel
08-18-2005, 05:42 PM
Your page loads really fast. I did a debug and took care of all uncached templates. I will however look at that hack. Thanks.

Lionel
08-18-2005, 05:46 PM
Here are the results: all templates were cached
Page generated in 6.14095 seconds with 43 queries [Server Loads: 0.74 0.75 : 0.59]

Mark.B
08-18-2005, 06:29 PM
I've somehow managed 36 on mine. I already have Erwin's hack and there are no uncached templates.

Having said that, it isn't loading particularly slowly so no real problems. But I may try and isoltae where the extra queries are.

Brian
08-18-2005, 06:45 PM
Open your forum/includes/config.php file and add this at the bottom of the file, just before the ?> mark:
$debug = 1;

Save & upload, go to your CMPS page and add "?explain=1" to the end of the URL, and post the results of that page here. Then remove the line of code you added to your config.php file as leaving it there could be a security risk.

Mark.B
08-18-2005, 07:46 PM
So far I've found that the Quick Moderation module has six queries. That seems to be the biggest one.

Lionel
08-18-2005, 09:54 PM
?explain=1
?&explain=1
both return a blank page.

However, I am able to reduce the amount of queries on homepage to 20
and the load time is 1.47 seconds.

I did that by using the great functionality of vbadvanced and splitting that page into two.

The second page I use to display the Geek articles and all the other addons hacks (vbjournal, links, gallery etc...).

That page calls up 26 queries and takes 5.5 seconds to load.

I also found out that the quick moderation module is pulling in a lot of queries.

Lionel
08-19-2005, 12:03 AM
I put the $debug code in global.php and this what I get for results. It remains the same when I click or put explain. Don't know if this is what you are looking for? I'd love to have my site as fast as here.

adv_portal (1)
adv_portal_G180_top_posters (1)
adv_portal_G180_top_posters_data (10)
adv_portal_buddylist (1)
adv_portal_footer (1)
adv_portal_gallery_random (1)
adv_portal_geekfeaturedarticle (1)
adv_portal_haitiwebs_articles (1)
adv_portal_latestgeekarticlebits (2)
adv_portal_latestgeekarticles (1)
adv_portal_latestjokes (1)
adv_portal_latestjokesbits (2)
adv_portal_latestjournalentry (1)
adv_portal_latestlinks (1)
adv_portal_linkbits (5)
adv_portal_news_archivebits (15)
adv_portal_nowplay (1)
adv_portal_nowplaybits (5)
adv_portal_onlineusers (1)
adv_portal_stats (1)
adv_portal_taux (1)
adv_portal_thegeeknewsbits (8)
adv_portal_tools (1)
adv_portal_topstats (1)
customquicklink (9)
footer (2)
forumhome_loggedinuser (5)
gobutton (1)
header (1)
headinclude (1)
journal_latestentrybits (5)
navbar (1)
navbar_link (1)
navbar_uttstore_actions (19)
option (10)
phpinclude_start (1)
spacer_close (1)
spacer_open (1)
timezone (1)
top_thanks (10)
username_loggedin (1)
vbpager_new (1)

Lionel
08-19-2005, 01:10 AM
By splitting the homepage I got it to load in 1.5 + seconds, but the server load shoots up 3.5+ with 61 connected.

The second page takes from 5 to 7 seconds to load. Once I disable the stats and the nowplaying, I get it around 2.50 + seconds

Brian
08-19-2005, 11:56 AM
?explain=1
?&explain=1
both return a blank page.
That should return a listing of all the queries and such. Try adding that code again, then at the bottom of the page near where it lists the templates used you should see an "(Explain)" link that will take you to the same place.

By splitting the homepage I got it to load in 1.5 + seconds, but the server load shoots up 3.5+ with 61 connected.

The second page takes from 5 to 7 seconds to load. Once I disable the stats and the nowplaying, I get it around 2.50 + seconds
That's still quite a while. I have about 6 custom modules on my personal site and the load time is still only about 0.2 - 0.3 seconds.
Another thing I might suggest would be to upgrade to 2.0 of the CMPS. There were a couple of optimizations in that version that could cut down the query time for the news and latest threads modules pretty significantly.

phoenixdown
08-19-2005, 05:45 PM
I think its the journal - disable those plug ins and you'll see it drop down.

zain jaffer
08-19-2005, 05:54 PM
for me the statistic mod really slowed down the site but i still had 2.00 so idisabled that and it loaded my site fast again

Lionel
08-19-2005, 11:04 PM
That should return a listing of all the queries and such. Try adding that code again, then at the bottom of the page near where it lists the templates used you should see an "(Explain)" link that will take you to the same place.


That's still quite a while. I have about 6 custom modules on my personal site and the load time is still only about 0.2 - 0.3 seconds.
Another thing I might suggest would be to upgrade to 2.0 of the CMPS. There were a couple of optimizations in that version that could cut down the query time for the news and latest threads modules pretty significantly.

explain still gives me a blank page.
I am going to look at 2.0 and see if I could upgrade without loosing anything.

The real killer for me is the nowplay hack on the second page, plus the registered today added in stats.

Lionel
08-19-2005, 11:05 PM
I think its the journal - disable those plug ins and you'll see it drop down.

journal is not the problem at all. That was my first suspicion since it had cause problems earlier solved by Brian.

Brian
08-20-2005, 03:47 PM
explain still gives me a blank page.
Does it give you a blank page when clicking on the (Explain) link on a normal forum page as well? If so then you've probably added a hack incorrectly as you should get a page printing out all of the queries and such for debugging purposes.

Lionel
08-20-2005, 03:58 PM
Yes it still does. Even on a the new 'virgin' page from the cms upgrade 2.0

Brian
08-20-2005, 04:17 PM
I'd suggest getting a fresh, un-hacked copy of your includes/functions.php file and try uploading that to see if it helps.

Lionel
08-20-2005, 04:31 PM
I will have to try later. A fresh copy of functions.php gives me an error as the page is calling undefined functions in hacked functions.php

Lionel
08-20-2005, 04:59 PM
A clean functions and a clean global would not produce the desired results

Lionel
08-21-2005, 02:47 PM
weird. I installed a performance hack in sessions.php and now it works


results are rather long and will not be accepted in the post. What are looking for specifically?

Brian
08-21-2005, 03:20 PM
I wouldn't think they would be *that* long... Would you like to just it to a text file and email it to "my name _at_ vbadvanced.com"? Or actually, if you'd rather just submit a support ticket so I can take a look at things myself I'll be glad to take a look and give you my suggestions.