Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Mod: Member Ratings
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Raichelle
Junior Member

370 Posts

Posted - 19 August 2001 :  20:42:15  Show Profile
umm i added this mod 2 days ago and i have notice my forum getting too slow.. today its worst takes mins to load i know its not my server because other pages load faster only the forum a lil slow.. anyone else notice this? or it could not be because of this mod maybe i have too much mods on it thats why

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 19 August 2001 :  21:47:55  Show Profile
you could try taking out the mod and seeing if that helps...Just remove the calls in topic.asp as that's probably where you're seeing the most slowdown and see if that fixes it. If it does I'll look at recoding it for speed issues.

http://www.ugfl.net/forums
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 20 August 2001 :  17:50:07  Show Profile  Visit dayve's Homepage
I haven't noticed anything effecting my performance but I would agree, you can simply put a link in the topic postings that will say "Member Rated" and exclude the graphical rating. Clicking the link will take you to their profile where you can see their rating instead of having it in each topic. I am going to monitor this a little closer but I used a dial up today and have not seen this as an issue.

Question. What kind of database and how large is it? I am using Access2K with only 10,000 posts @ 9 megabytes (that includes all of my tables). I have not witnessed any performance issues though.



Dayve
Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 20 August 2001 :  17:58:16  Show Profile
I've got an access 2k with about 5k posts and it weighs in at about 4 megs...with no performance issues....Tried it over *shudder* AOHell the other day and didn't notice anything odd or slow.

http://www.ugfl.net/forums

Edited by - Big9erFan on 20 August 2001 17:59:25
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 20 August 2001 :  18:08:03  Show Profile
Suggestion...

In the topic.asp file in the zip file, @Line 433, there's this statement:

iReplyRating = GetMemberRatingAvg( rs("R_AUTHOR") )

The GetMemberRatingAvg function looks like this:


function GetMemberRatingAvg( iMemberID )

strSQL = ""
strSQL = "SELECT MEMBER_RATING_TOTAL, MEMBER_RATING_TOTAL_COUNT "
strSQL = strSQL & "FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID =" & iMemberID
set rsMemberRating = Server.CreateObject("ADODB.Recordset")

rsMemberRating = my_Conn.Execute( strSQL )
if rsMemberRating("MEMBER_RATING_TOTAL_COUNT") = 0 Then
iRating = 0
else
iRating = cint( rsMemberRating("MEMBER_RATING_TOTAL") / rsMemberRating("MEMBER_RATING_TOTAL_COUNT") )

end if


set rsMemberRating = nothing

GetMemberRatingAvg = iRating

end function


For every reply/topic, you're making another query to the database for the member ratings. This isn't necessary since the sql statements for the topic/reply information already includes a join with the member table.

If you move back up to Line 330, you'll find the SQL statement for the replies. There's already a join to the member table, so all you need to do is add in two more lines here to pull the information you need for member's totals.

strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_RATING_TOTAL, "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_RATING_TOTAL_COUNT, "

If you really want to get more extreme, you could add a field that holds the Average. This would reduce the additional field reference to only 1 and eliminate having to do another calculation per topic/reply.

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 20 August 2001 :  19:16:35  Show Profile
work mule,

That's why I said if people were having a lot of slowdown I would re-write it to retreive those values when loading the topic and not have addition calls for each rating.

One of the reasons I modularized it like this was so that people could easily change how the output looked and was generated, though on large forums this could produced a slowdown.


To those that are experiencing slowdowns that they think are attributed to this mod make the changes that Work Mule described ( similar changes in pop_profile as well ).



http://www.ugfl.net/forums
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 20 August 2001 :  21:56:21  Show Profile  Visit dayve's Homepage
Raichelle, give us a link to your site if you don't mind. I'd like to see how many mods you have. My topic.asp is loaded up with requests for additional info and like I said earlier, I am not experiencing any problems. I'd like to see what you consider slow performance. Thanks.

Dayve
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07