The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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: Code:
SELECT user.userid,user.username FROM pollvote AS pollvote, user AS user WHERE user.userid = pollvote.userid AND pollid = '1832' AND voteoption = '1' ORDER BY username ASC Time before: 0.42810201644897 Memory Before: 698KB Time after: 0.87274694442749 Time taken: 0.44464492797852 Memory After: 698KB Any idea as to why these queries are that slow and how this could be optimized (vB3)? |
#2
|
||||
|
||||
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: https://vborg.vbsupport.ru/showthread.php?t=66694) |
#3
|
||||
|
||||
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. |
#4
|
||||
|
||||
perfect, then i can release it |
#5
|
||||
|
||||
Bad mistake on part of the Vbulletin Dev's. Report it to the bugtracker if you already havn't.
|
#6
|
||||
|
||||
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 ^^ |
#7
|
|||
|
|||
Good bug find!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|