
08-07-2006, 07:17 PM
|
 |
|
|
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by christianb
I got mine up to 1.699seconds (in firefox) - try this - I removed a bunch of stuff that needn't be used (things I had from a query that I'm using for a hack I'm going to release later this week).
Try this one out - if this works, I'll update the hack today - which it possibly could. I disabled my vbshout and installed this and shaved 70% off my delay.
|
Still slow as *  .
Quote:
Originally Posted by christianb
ok, try this then in the plugin, find this:
PHP Code:
$gettickers = $db->query_read("
SELECT t.threadid, t.title, t.lastpost, t.forumid, t.open, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, t.visible, t.firstpostid, f.title AS forumtitle
FROM " . TABLE_PREFIX . "forum f
INNER JOIN " . TABLE_PREFIX . "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " . $desclim . " > ( SELECT count(" . $desclim . ") FROM " . TABLE_PREFIX . "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
LEFT OUTER JOIN " . TABLE_PREFIX . "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" . implode(',', $tickarray) . ")
ORDER BY field(f.forumid," . implode(',', $tickarray) . "), t.dateline desc
");
and replace with this
PHP Code:
$gettickers = $db->query_read("
SELECT t.threadid, t.title, t.forumid, t.open, t.dateline, t.visible, t.firstpostid
FROM " . TABLE_PREFIX . "forum f
INNER JOIN " . TABLE_PREFIX . "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " . $desclim . " > ( SELECT count(" . $desclim . ") FROM " . TABLE_PREFIX . "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
LEFT OUTER JOIN " . TABLE_PREFIX . "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" . implode(',', $tickarray) . ")
ORDER BY field(f.forumid," . implode(',', $tickarray) . "), t.dateline desc
");
and then find this
PHP Code:
$ticker['title'] = preg_replace('/\<[a-zA-Z0-9 \<\<\,\>\>\.\?\/\:\;\~\"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/', '', $ticker['title']);
$ticker['title'] = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
$ticker['date'] = vbdate($vbulletin->options['dateformat'], $ticker['dateline']);
$ticker['time'] = vbdate($vbulletin->options['timeformat'], $ticker['dateline']);
$ticker['replycount'] = vb_number_format($ticker['replycount']);
$ticker['views'] = vb_number_format($ticker['views']);
and replace with this:
PHP Code:
$ticker['title'] = preg_replace('/\<[a-zA-Z0-9 \<\<\,\>\>\.\?\/\:\;\~\"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/', '', $ticker['title']);
$ticker['title'] = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
$ticker_titles .= '<a href="showthread.php?t='. $ticker['threadid'] .'" title="'. $ticker['title'] .'" target="blank">'. $ticker['title'] .'</a> '. $ticksep.'';
|
Do I have to try these things also?
|