Welcome, Guest. Please Login or Register.
April 26, 2025, 04:21:37 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2! « previous next »
Pages: [1] 2 3 ... 10 Reply Ignore Print
Author Topic: [Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2!  (Read 25679 times)
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
[Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2!
« on: August 18, 2002, 09:02:54 PM »
Reply with quote

This mod is targeted at large sites which suffer from a slow boardindex (the front page of the YaBB SE forum). The mod was originally designed for Eldaronline.com where boardindex was loaded more than 50% faster.

It keeps track of the most recent topic for every board and stores it in the database. This way boardindex doesn't have to determine which message was the most recent. Thus reducing the number of queries by 3 * number_of_boards for every time boardindex is requested.

Version 2: improves several queries and eleminates queries when possible.

In order to use this MOD, run the SpeedUpBoardIndex.php at the root dir of your YaBB first! Then use boardmod to modify your files and upload the modified files to the Sources-dir.

Version 0.9 beta
Version 0.91 beta
Version 0.92 beta
Version 1.0
Version 1.1 (including BETA 1.4.0)
Version 1.11 (including BETA 1.4.0 and BETA 1.3.x)
Version 1.12 (including BETA 1.4.0 and BETA 1.3.x)
Version 1.13 (includes [1.4.1], [1.4.0] and [1.3.x])

Version 2.0 Beta (includes [1.4.1], [1.4.0] and [1.3.x])
Version 2.1 Beta (includes [1.4.1], [1.4.0] and [1.3.x])
Version 2.2 (includes [1.4.1], [1.4.0] and [1.3.x])
Version 2.3 (includes [1.4.1], [1.4.0] and [1.3.x])

Complete YaBB SE 1.4.1 safe mode install with this mod implemented
No scripts are required to be executed when installing this version.

Complete YaBB SE 1.4.1 upgrade version with this mod implemented
upgrade.php contains all database modifications, including those of this mod. Use this version to upgrade from earlier versions of YaBB SE

note: this mod will be also included in version 1.5.0 by default
« Last Edit: December 05, 2002, 05:51:12 PM by Compuart » Logged

iamdamnsam
Full Member
***
Posts: 225


RamchargerCentral.Com

WWW
Re:[BETA 1.4.1]Faster boardindex
« Reply #1 on: August 18, 2002, 10:05:21 PM »
Reply with quote

will this work with 1.31?
Logged

Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[BETA 1.4.1]Faster boardindex
« Reply #2 on: August 18, 2002, 10:09:40 PM »
Reply with quote

Quote from: iamdamnsam on August 18, 2002, 10:05:21 PMwill this work with 1.31?
I'm affraid not. You can always try (at your own risk of course ;D), but boardindex has had some changes since 1.3.1
Logged

Shadowgate
Jr. Member
**
Posts: 69


Heehaw

Re:[BETA 1.4.1]Faster boardindex
« Reply #3 on: August 18, 2002, 11:14:09 PM »
Reply with quote

I will definitely be installing this when I get time!
Logged
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[BETA 1.4.1]Faster boardindex
« Reply #4 on: August 19, 2002, 03:44:14 AM »
Reply with quote

It does not seem to want to work with 1.4.0, boardindex has the line:

   $result_boards = mysql_query ("SELECT c.name as catName, c.ID_CAT, b.ID_BOARD, b.name as boardName, b.description, b.moderators, b.numPosts, b.numTopics FROM {$db_prefix}categories as c LEFT JOIN {$db_prefix}boards as b ON (b.ID_CAT=c.ID_CAT) WHERE ('$settings[7]'='Administrator' || '$settings[7]'='Global Moderator' || FIND_IN_SET('$settings[7]',c.memberGroups)!=0 || c.memberGroups='') ORDER BY c.catOrder, b.boardOrder");

Where the mod says that line should be:

   $result_boards = mysql_query ("SELECT c.name as catName, c.ID_CAT, b.ID_BOARD, b.name as boardName, b.description, b.moderators, b.numPosts, b.numTopics, c.memberGroups FROM {$db_prefix}categories as c LEFT JOIN {$db_prefix}boards as b ON (b.ID_CAT=c.ID_CAT)$condition ORDER BY c.catOrder, c.ID_CAT, b.boardOrder, b.ID_BOARD");

Changing the code in boardindex to reflect both of your search for statements solves the problem (possibly another mod change occured ?) BUT, after changing the boardindex to reflect your boardindex, the following error occurs when I applied the mod:

An Error Has Occurred!

2: Bad arguments to implode()
(/usr/local/psa/home/vhosts/the-meeting-place.com/httpdocs/yabbse/Sources/BoardIndex.php ln 217)



« Last Edit: August 19, 2002, 04:03:11 AM by Wiziwig » Logged

Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #5 on: August 19, 2002, 05:01:52 AM »
Reply with quote

*cough* Posting rules

http://www.yabb.info/community/index.php?board=158;action=display;threadid=11961  ;)
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Gobalopper
Mod Team
YaBB God
*****
Posts: 993


Cookie Monster

WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #6 on: August 19, 2002, 05:08:10 AM »
Reply with quote

In the .php file there is this query:

CREATE TABLE {$db_prefix}test2 (type tinytext NOT NULL, value tinytext NOT NULL) TYPE=MyISAM;
Is that still needed because I don't see it mentioned in the .mod file.
Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #7 on: August 19, 2002, 05:11:35 AM »
Reply with quote

Quote from: Wiziwig on August 19, 2002, 03:44:14 AMIt does not seem to want to work with 1.4.0
Well, the only thing I can say is...go install 1.4.1  ;)


Quote from: Nemesis on August 19, 2002, 05:01:52 AM*cough* Posting rules
woops, forgot to IM you, right?  :o
Logged

Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #8 on: August 19, 2002, 05:17:44 AM »
Reply with quote

Quote from: Gobalopper on August 19, 2002, 05:08:10 AMIn the .php file there is this query:

CREATE TABLE {$db_prefix}test2 (type tinytext NOT NULL, value tinytext NOT NULL) TYPE=MyISAM;
Is that still needed because I don't see it mentioned in the .mod file.
errr, no, it was a query from a dummy file which I forgot to remove...  :-\

Fixed it in v 0.91
Logged

Shadowgate
Jr. Member
**
Posts: 69


Heehaw

Re:[Beta 1.4.1]Faster boardindex
« Reply #9 on: August 19, 2002, 09:11:48 AM »
Reply with quote

I installed this mod and I don't notice a difference in load times....

I have 40k+ posts but I guess the huge boards may benefit?
Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #10 on: August 19, 2002, 09:38:36 AM »
Reply with quote

Quote from: Shadowgate on August 19, 2002, 09:11:48 AMI have 40k+ posts but I guess the huge boards may benefit?
At some point the amount of users times the amount of queries cannot be handled by the capacity of the SQL server. If that point is reached, users have to wait for queries to be executed. For large boards with many users at a time or without enough SQL server capacity this sometimes happens, resulting in a 30+ seconds time for boardindex to load. If your users don't experience that kind of waiting times, you're just lucky your SQL server can handle it  ;)

(for large board, this mod couldn't hurt though...)
Logged

Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #11 on: August 19, 2002, 03:52:10 PM »
Reply with quote

Quote from: Shadowgate on August 19, 2002, 09:11:48 AMI installed this mod and I don't notice a difference in load times....

I have 40k+ posts but I guess the huge boards may benefit?

Do me a favor open up template.php and remove the <yabb msn> tag and seeif it loads faster. If not put it back in.  ;D
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #12 on: August 19, 2002, 07:37:04 PM »
Reply with quote

Welp I did. Upgraded to 1.4.1 and it mods. BUT changes to the boardindex produces doubled message topics. for instance if I have my index like this:

General topics
 topic one
 topic two
announcements
 topic one
 topic two
Personals
  topic one
  topic two
  topic three

It displays after your changes in the boardindex to this:

General topics
  topic one
  topic two
Announcements
  topic one
  topic one
  topic two
  topic two
Personals
  topic one
  topic one
  topic one
  topic two
  topic two
  topic two
  topic three
  topic three
  topic three

Get my meaning? Changing the boardindex.php back to the original code eliminates this. The one and only other mod done to this file is mouseover effects and that change is very few lines long and is only a display code change.

<search for>
         print <<<EOT
  <tr>
    <td class="windowbg" width="6%" align="center" valign="top">$new</td>
    <td class="windowbg2" align="left" width="60%">

</search for>


<replace>
         print <<<EOT
 <tr>
   <td class="windowbg" bgcolor="$color[windowbg]" width="6%" align="center" valign="top">$new</td>
   <td class="windowbg2" bgcolor="$color[windowbg2]" onmouseover="this.style.backgroundColor='$color[windowbg]'" onmouseout="this.style.backgroundColor=''" align="left" width="60%">
</replace>


<search for>
  <td class="windowbg2" valign="middle" width="22%"><font size="1">$latestPostTime<br />$txt[yse88] <a href="$scripturl?board=$row_board[ID_BOARD];action=display;threadid=$topicID;start=$startPage;boardseen=1">$subject</a><br> $txt[525] $latestPostName</font></td>
 </tr>
</search for>


<replace>
   <td class="windowbg2" bgcolor="$color[windowbg2]" onmouseover="this.style.backgroundColor='$color[windowbg]'" onmouseout="this.style.backgroundColor=''" valign="middle" width="22%"><font size="1">$latestPostTime<BR>in <a href="$scripturl?board=$row_board[ID_BOARD];action=display;threadid=$topicID;start=$startPage">$subject</a><br> $txt[525] $latestPostName</font></td>
 </tr>

</replace>
Quote
« Last Edit: August 19, 2002, 07:38:19 PM by Wiziwig » Logged

Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.

ICQ - 9814812webby@salesplaza.nl WWW
Re:[BETA 1.4.1]Faster boardindex
« Reply #13 on: August 19, 2002, 08:23:55 PM »
Reply with quote

Quote from: Compuart on August 18, 2002, 10:09:40 PM
Quote from: iamdamnsam on August 18, 2002, 10:05:21 PMwill this work with 1.31?
I'm affraid not. You can always try (at your own risk of course ;D), but boardindex has had some changes since 1.3.1

Would it be wise to try it then ;) ?
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:[Beta 1.4.1]Faster boardindex
« Reply #14 on: August 19, 2002, 10:33:04 PM »
Reply with quote

Quote from: Wiziwig on August 19, 2002, 07:37:04 PMWelp I did. Upgraded to 1.4.1 and it mods. BUT changes to the boardindex produces doubled message topics.
This is very odd. I don't have an explenation for this other than that some columns in the DB structure might not be as unique as I thought.

Anywayz, since I'm not sure how this can be solved here's my best guess:

try replacing (modified boardindex.php)
      SELECT c.name AS catName,c.ID_CAT,b.ID_BOARD,b.name AS boardName,b.description,b.moderators,b.numPosts,b.numTopics,c.memberGroups,m.posterName,m.posterTime,m.subject,t.ID_TOPIC,t.numReplies,mem.realName,IFNULL(lb.logTime,0) AS boardTime,IFNULL(lmr.logTime,0) AS markReadTime

with:
      SELECT DISTINCT c.name AS catName,c.ID_CAT,b.ID_BOARD,b.name AS boardName,b.description,b.moderators,b.numPosts,b.numTopics,c.memberGroups,m.posterName,m.posterTime,m.subject,t.ID_TOPIC,t.numReplies,mem.realName,IFNULL(lb.logTime,0) AS boardTime,IFNULL(lmr.logTime,0) AS markReadTime
(only thing changed is the DISTINCT keyword)

I hope you can try it in order to see if this makes the mod work. Thanx  :)
Logged

Pages: [1] 2 3 ... 10 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.x & 1.3.x] Speedup your Boardindex NEW Version 2! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.016 seconds with 16 queries.