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)
 User Profiles: Fixing Differences in Performance
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  11:56:24  Show Profile  Visit SiSL's Homepage  Reply with Quote
What may cause this?

Here some results,

As admin, my profile page (when looking at others profiles pop_profile.asp) is created like 0.8 seconds, as user 32.85 seconds... But there should not be that much difference between admin & user, right? I mean where I can try to find solution in codes?

What may cause this?

Mods I have installed:
- Anti-spam mod (cant recall exact name)
- Avatar mod
- Poll mod
- Active Users

NOTE: I have tried it several times and got it tried to some of my users.

TXT Version of POP_PROFILE.ASP

TXT Version of INC_PROFILE.ASP

Moved and renamed by ruirib<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 24 September 2005 12:11:21

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 September 2005 :  12:03:14  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Very weird. That's not a common issue at all. Maybe post a link to a text version of your pop_profile.asp and inc_profile.asp files.
<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 24 September 2005 :  12:06:08  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message  Reply with Quote
You might want to try to disable the Recent Topics feature (Admin Options -> Member Details Configuration) and see if it makes any difference.<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  12:12:35  Show Profile  Visit SiSL's Homepage  Reply with Quote
ruirib: Added txt versions of files into first posts.
OneWayMule: I will try and let you know the results.<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  12:16:38  Show Profile  Visit SiSL's Homepage  Reply with Quote
Recent topics made the difference, but what causing difference in recent topics between admin & users I wonder :(<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 24 September 2005 :  12:40:50  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
This won't help you but it happened here at Snitz once - http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=57286&whichpage=1

No cause found. It was fixed by moving to a new server.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  13:17:08  Show Profile  Visit SiSL's Homepage  Reply with Quote
It is almost very same problem. HuWR was getting fast results as admin, but users dont, hence I dont have chance to change my host since it is co-location computer. Just wondering if it is from MSSQL settings should be different or what.


<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 24 September 2005 13:18:20
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 September 2005 :  15:20:30  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
SiSL,

In your pop_profile.asp, around line# 399, here now you have,

                                        strsql = "SELECT F.FORUM_ID"
					strSql = strSql & ", T.TOPIC_ID"
					strSql = strSql & ", T.T_SUBJECT"
					strSql = strSql & ", T.T_STATUS"
					strSql = strSql & ", T.T_LAST_POST"
					strSql = strSql & ", T.T_REPLIES "
					strSql = strSql & " FROM ((" & strTablePrefix & "FORUM F LEFT JOIN " & strTablePrefix & "TOPICS T"
					strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID) LEFT JOIN " & strTablePrefix & "REPLY R"
					strSql = strSql & " ON T.TOPIC_ID = R.TOPIC_ID) "
					strSql = strSql & " WHERE (T_DATE > '" & strStartDate & "') "
					strSql = strSql & " AND (T.T_AUTHOR = " & ppMember_ID
					strSql = strSql & " OR R.R_AUTHOR = " & ppMember_ID & ")"
					strSql = strSql & " AND (T_STATUS < 2 OR R_STATUS < 2)"
					strSql = strSql & " AND F.F_TYPE = 0"
					strSql = strSql & " ORDER BY T.T_LAST_POST DESC, T.TOPIC_ID DESC"


replace it by

	                                strsql = "SELECT F.FORUM_ID"
					strSql = strSql & ", T.TOPIC_ID"
					strSql = strSql & ", T.T_SUBJECT"
					strSql = strSql & ", T.T_STATUS"
					strSql = strSql & ", T.T_LAST_POST"
					strSql = strSql & ", T.T_REPLIES "
					strSql = strSql & " FROM (" & strTablePrefix & "FORUM F INNER JOIN " & strTablePrefix & "TOPICS T"
					strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID)"
					strSql = strSql & " WHERE (T_DATE > '" & strStartDate & "') "
					strSql = strSql & " AND (T.T_AUTHOR = " & ppMember_ID & ")"
					strSql = strSql & " AND (T_STATUS < 2)"
					strSql = strSql & " AND (T_REPLIES < 1) AND F.F_TYPE = 0"
					strSql = strSql & " UNION"
					strsql = strsql & " SELECT F.FORUM_ID"
					strSql = strSql & ", T.TOPIC_ID"
					strSql = strSql & ", T.T_SUBJECT"
					strSql = strSql & ", T.T_STATUS"
					strSql = strSql & ", T.T_LAST_POST"
					strSql = strSql & ", T.T_REPLIES "
					strSql = strSql & " FROM ((" & strTablePrefix & "FORUM F INNER JOIN " & strTablePrefix & "TOPICS T"
					strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID) INNER JOIN " & strTablePrefix & "REPLY R"
					strSql = strSql & " ON T.TOPIC_ID = R.TOPIC_ID) "
					strSql = strSql & " WHERE (T_DATE > '" & strStartDate & "') "
					strSql = strSql & " AND (R.R_AUTHOR = " & ppMember_ID & ")"
					strSql = strSql & " AND (T_STATUS < 2 OR R_STATUS < 2)"
					strSql = strSql & " AND F.F_TYPE = 0"
					strSql = strSql & " ORDER BY T.T_LAST_POST DESC, T.TOPIC_ID DESC"


Let me know if it improves on your problem.

P.S.:This code is good only for Access or SQL Server. MySQL versions that support UNIONS (4.0+) should also be ok, BUT NO TESTING WAS DONE.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  17:51:27  Show Profile  Visit SiSL's Homepage  Reply with Quote
It is now much faster for 'admin' but still having (will keep code)

This page was generated in 0.41 seconds. = admin
This page was generated in 23.06 seconds. = user

You can see at http://www.amedia.org/forum/

user: demo
pass: test<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 24 September 2005 17:53:54
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 September 2005 :  18:02:13  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Can you compare both versions of the file (with and without the change) regarding the recent posts that appear for each user? I think they should be, but want to be sure...<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 September 2005 :  18:08:24  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
The difference in performance quite surely results from the fact that each topic must be evaluated against users permissions, to ensure that the user viewing the profile has access to the topics.

Using getrows instead of the navigating the recordset could also help improving the performance.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 September 2005 :  19:19:23  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 24 September 2005 :  20:34:05  Show Profile  Visit SiSL's Homepage  Reply with Quote
I did some testing my avarage non-admin user see ~23-24 seconds..

With latest code, that didnt change actually. Above user & pass active for each code changes.

Is it from setup variables or something I had to do with settings of MSSQL to increase performance?
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 24 September 2005 20:34:59
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 25 September 2005 :  02:55:53  Show Profile  Visit modifichicci's Homepage  Reply with Quote
P.S.:This code is good only for Access or SQL Server. MySQL versions that support UNIONS (4.0+) should also be ok, BUT NO TESTING WAS DONE.


Mysql 4.0.25
I get an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Unknown column 'T.TOPIC_ID' in 'ORDER BY'

/forumlang/test/pop_profile.asp, line 565

and this is the sqlstr
SELECT F.FORUM_ID, T.TOPIC_ID, T.T_SUBJECT, T.T_STATUS, T.T_LAST_POST, T.T_REPLIES FROM (FORUM_FORUM F INNER JOIN FORUM_TOPICS T ON F.FORUM_ID = T.FORUM_ID) WHERE (T_DATE > '20050826090251') AND (T.T_AUTHOR = 2) AND (T_STATUS < 2) AND (T_REPLIES < 1) AND F.F_TYPE = 0 UNION SELECT F.FORUM_ID, T.TOPIC_ID, T.T_SUBJECT, T.T_STATUS, T.T_LAST_POST, T.T_REPLIES FROM ((FORUM_FORUM F INNER JOIN FORUM_TOPICS T ON F.FORUM_ID = T.FORUM_ID) INNER JOIN FORUM_REPLY R ON T.TOPIC_ID = R.TOPIC_ID) WHERE (T_DATE > '20050826090251') AND (R.R_AUTHOR = 2) AND (T_STATUS < 2 OR R_STATUS < 2) AND F.F_TYPE = 0 ORDER BY T.TOPIC_ID DESC
<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 25 September 2005 :  05:18:54  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
I don't know MySQL that well. Don't use this until I get the chance to test it with it.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 25 September 2005 :  13:54:38  Show Profile  Visit SiSL's Homepage  Reply with Quote
ruirib: Found an error I made while pasting your code, it seems now it works like a charm :),

Thanks a lot

Here is some new results with "Recent Topics" on

This page was generated in 0.08 seconds.
This page was generated in 0.17 seconds.
This page was generated in 0.19 seconds.
This page was generated in 0.2 seconds.<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 25 September 2005 13:57:16
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07