| Author |
Topic Search Topic Options
|
PrimeraRacer
Groupie
Joined: 29 January 2003
Location: United Kingdom
Status: Offline
Points: 83
|
Post Options
Thanks(0)
Quote Reply
Topic: Slow Default.asp load time Posted: 24 October 2003 at 4:25pm |
ayup, just wanted to throw this down on the table and see if there is any way to speed it up.
the default.asp page on the forum always takes longer to load. in a perfect scenario when a user is logged in we get about 4.2 seconds which is bearable.
where you are not logged in the load time jumps up to about 20 seconds.
also, all the other forum pages are super quick and its definately not a problem with the host as this is the same on two different hosts and we have just upgraded to a dedicated server now. also it happened when the forum was bog standard too straight out of the box.
I just want to know why it takes much longer to load that page and what can be done to speed up the load time.
the system is SQL and the forum address is http://www.npoc.co.uk/forum
this IS a confirmed issue with the code on default.asp.... just want to know what can be changed to speed it up!
many thanks, hope we can find something!!
Kev
|
 |
PrimeraRacer
Groupie
Joined: 29 January 2003
Location: United Kingdom
Status: Offline
Points: 83
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2003 at 4:26pm |
ooh actually just wanted to throw in my thought on it.
I'm sure its something to do with the way it connects to SQL.... is there a faster SQL connection that can be made to the server at all?
|
 |
God_Struth
Senior Member
Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2003 at 9:45pm |
PrimeraRacer wrote:
this IS a confirmed issue with the code on default.asp.... |
If its a 'confirmed issue' then surely you would know whats wrong and would merely be seeking help on how to ammend it, if you don't know then it cannot be a 'confirmed issue'.
Post what results you got that came to the conclusion that this is indeed a problem. I also use SQL version and would love to know what speed issues you have found.
|
|
"I'm only trying to help......"
|
 |
ljamal
Mod Builder Group
Joined: 16 April 2003
Status: Offline
Points: 888
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2003 at 11:46pm |
|
Are your SQL server and web server on the same network? The load problem you are experiencing is caused by the multiple calls to the database. With version 7.01, the default page makes 3-4 calls to the SQL Server per forum in the database. Each call takes maybe .5 seconds, but when you have 10-20 forums, it begins to add up. I first noticed this problem when I went live with the forums as my SQL server is local to my development server but it's 3 time zones away from my live server and pages that took 2 seconds to generate on the development server were taking 15-20 seconds on the live server.
The solution for me was to rewrite the code for the most accessed pages so that all the information could be returned from one call to the SQL Server. I would love to sit down and implement it through the forum, but it would take a major rewrite of the code as the code for the forum does not use SQL Server to its maximum potential. This forum is really written for Access and that's the main reason that the SQL Server code is poorly implemented.
My suggestion, if you don't have a large forum is to which to Access. Otherwise, to speed up the pages you will need to rewrite the SQL calls for the slow pages.
|
|
|
 |
PrimeraRacer
Groupie
Joined: 29 January 2003
Location: United Kingdom
Status: Offline
Points: 83
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 October 2003 at 5:33am |
God_Struth wrote:
PrimeraRacer wrote:
this IS a confirmed issue with the code on default.asp.... |
If its a 'confirmed issue' then surely you would know whats wrong and would merely be seeking help on how to ammend it, if you don't know then it cannot be a 'confirmed issue'.
Post what results you got that came to the conclusion that this is indeed a problem. I also use SQL version and would love to know what speed issues you have found.
|
I knew I would get someone answer like this. if you read the post properly you would see I put "issue" not problem. its confirmed because it slows down when your not logged in, hence its not an ISP thing....also it only happens on the defautl page and no others. perhaps you could just help me try and improve it rather than try and instantly throw it back on me.... the guy after you seems to be helping, why not try and be more like him eh!
|
 |
PrimeraRacer
Groupie
Joined: 29 January 2003
Location: United Kingdom
Status: Offline
Points: 83
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 October 2003 at 5:35am |
ljamal wrote:
Are your SQL server and web server on the same network? The load problem you are experiencing is caused by the multiple calls to the database. With version 7.01, the default page makes 3-4 calls to the SQL Server per forum in the database. Each call takes maybe .5 seconds, but when you have 10-20 forums, it begins to add up. I first noticed this problem when I went live with the forums as my SQL server is local to my development server but it's 3 time zones away from my live server and pages that took 2 seconds to generate on the development server were taking 15-20 seconds on the live server.
The solution for me was to rewrite the code for the most accessed pages so that all the information could be returned from one call to the SQL Server. I would love to sit down and implement it through the forum, but it would take a major rewrite of the code as the code for the forum does not use SQL Server to its maximum potential. This forum is really written for Access and that's the main reason that the SQL Server code is poorly implemented.
My suggestion, if you don't have a large forum is to which to Access. Otherwise, to speed up the pages you will need to rewrite the SQL calls for the slow pages. |
many thanks.
Its really only the default page that slow, I figured it would be calls to the SQL server or somethign slowing it dow, we do indeed have quite a few forums. I'm no expert when it comes to writing calls to an SQL server but any help you can give on getting just that page sorted would be a great help!!!
Thanks again
|
 |
ljamal
Mod Builder Group
Joined: 16 April 2003
Status: Offline
Points: 888
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 October 2003 at 9:02am |
|
Without physical rewriting the page for you, there is not much help to be given.
Currently for the default page, WWF makes:
1 hit to check the database configuration
4 if you are logged in and have private messages turned on. 2 if PMs are turned off.
3 More if you have active messages turned on.
1 for All Categories
1 for each category to return the forums
1 for each forum to get forum permissions
1 for each forum to get the forum group Moderators (if moderators are displayed)
1 for each forum to get the forum user Moderators (if moderators are displayed)
1 for each forum to get the last post date
1 call to get the last registered user
2 calls to get the active users and guests
If you have 1 forum and everything turned on that's 17 hits to the database. That's the bare minimum hits to the database if you have forums and it increase from there.
I would love to consult with -borg- to correct this problem for SQL and suggest methods for improving the forum, but it would take a entire rewrite of the current code and I don't think he would be interested in something like that right now.
When I have time, I was planning on releasing a SQL optimized version of the code, but I have 4 projects i n production at this point. Maybe in the future, I'll have time to talk with -borg- about this.
|
|
|
 |
fernan82
Mod Builder Group
Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 October 2003 at 9:40am |
|
Here's some things you can do:
1. Get rid of the nav bar with the active users on top, that's a list 1 hit to the db depending how it's done.
2. Get rid of the member birthdays thing you got, that's at least one more hit.
3. Get rid of the latest posts at the bottom, that's at least one more hit and if you used the mod posted here that checks the permissions then it's one more hit for each latest topic 13 xtra hit's in your case. It can be done with just one tho, but the mod uses all that...
4. Disable active users. If I remember right WWF uses 2 or 3 hits to the db to get that simple count... Plus 3 more hits on active_users_inc.asp.
After you get rid of all that you should notice a difference...
Edited by fernan82
|
FeRnAN
|
 |