Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 29 Jun 2004, 23:44
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Showing public poll results = damn slow?

It seems like displaying results of public posts on my board is damn slow.

Looking at the queries I found that for each option there is one query, which takes kinde long to execute.

Example:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now let's say there are 10 options. Together with the time for the other queries and PHP processing this accumulates to 5+ seconds to generate the page!

Any idea as to why these queries are that slow and how this could be optimized (vB3)?
Reply With Quote
  #2  
Old 30 Jun 2004, 00:33
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Real name: Stefan Kaeser
Hmm, it isn't that slow on my testboard here, but i threw together a little optimization.

can you test it for me and post the results, i'll then release it in the optimization forum

(attachment can now be found: http://www.vbulletin.org/forum/showthread.php?t=66694)

Last edited by Xenon; 30 Jun 2004 at 00:56.
Reply With Quote
  #3  
Old 30 Jun 2004, 00:50
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Real name: Andreas
Although my code (which I wrote in the meanwhile) is slightly differnt it is basically the same as yours (without the USING part)

And this gave a HUGE performance boost: Page generation time went down approx. 5 seconds for the poll I tested.
Reply With Quote
  #4  
Old 30 Jun 2004, 00:52
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Real name: Stefan Kaeser


perfect, then i can release it
Reply With Quote
  #5  
Old 30 Jun 2004, 02:43
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Real name: Dusty Burns
Bad mistake on part of the Vbulletin Dev's. Report it to the bugtracker if you already havn't.
Reply With Quote
  #6  
Old 30 Jun 2004, 17:10
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Real name: Stefan Kaeser
well, everyone can make a mistake

even so, a query in a loop is a real big mistake, but hey, noones perfect. i'm sure it will be fixed in vb302 ^^
Reply With Quote
  #7  
Old 01 Jul 2004, 01:59
Brad Brad is offline
 
Join Date: Nov 2001
Good bug find!
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optmize Show Public Poll Results Xenon vBulletin 3.0 Full Releases 18 22 Oct 2004 22:22



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:30.

Layout Options | Width: Wide Color: