Author |
Topic |
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 24 March 2002 : 20:54:55
|
Thanks, yes I've seen the list of features, and think I even mentioned on that thread how great it really looks.
I was coming more from the angle of not feaures included, but offering suggestions on how more of the internal coding and structures could be improved. Now don't take that as me saying that you guys probably arent right on track, its just we seem to have so many good people around here right now that bouncing ideas off them now and then might just realise some interesting and beneficial results.
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 04:16:23
|
I am currently doing this, I was just trying to save you some work, as the code you are looking add is very different to the 3.4 code, so many of the suggetions made here are simply not possible now as the code has changed.
I am however using the idea of just pulling a list of froums into arrays for the moderation and subscription info, I should have some comparrison results to put up later so we can see what sort of improvemnet we can get on active.asp.
I have not concentrated on particular files until now, but have been removing a lot of reduntant stuff and combining others.
Somebody mentioned earlier about adding an index, In my investigation into the problems we were having with the help current/version here was fixed by adding a CLUSTERED INDEX to the FORUM_TOPICS.T_LAST_POST field, this has also improved the response of active.asp as it is also ordered by this field.
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 04:56:05
|
quote: I am currently doing this, I was just trying to save you some work, as the code you are looking add is very different to the 3.4 code, so many of the suggetions made here are simply not possible now as the code has changed.
No problem I realised you intentions were good The mucking around I did yesterday on this was only a couple of hours of time I was killing anyway (got me out of washing the dog anyway !)
I'll have a look around I had a huge trace file from my foums that I'd put into sql's optimiser and it came up with a few new indexes which improved my forums considerably a while back also, If I can't find the trace and recreate the reccomendations then I can probably script out the current indexes I have and take a look at the differences.
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 05:37:11
|
The only index I have had to add was the clustered index, but that was to fix a specific problem, I have run countless profilers and never had to add any indexes, it may be that you had one or two missing.
Test on Active.ASP Ok, I hardcoded a date for the active since, so that it would give me a nice hefty result.
With the new standard active.asp, the page took 52secs to load Changing to use GetRows (no other changes) took 37secs to load
am now changing the way it checks subs etc.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 05:47:04
|
changing the check forum access to use an array, has very little if any impact on the performance of Snitz's active.asp, this may be different if you have a high percentage of private forums.
I tested this by a) leaving the currentcheck for every pass of the loop, then b) removed the check completely thus assuming I had access to everything (ie no call to chkfoumaccess) it only made 0.2secs difference in the 37 second query, so not worth tinkerring with.
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 05:54:43
|
No they were additional indexes reccomended rather than ones missing. I'm referring to a moded forum here rather than an out of the box too which may be the difference.
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 06:39:37
|
Ok, sounds reasonable.
Now, please be seated, this may be a shock. The times I posted above were tested against a copy of this database with me logged in as an admin.
logged in as a normal user, the same active.asp takes 11.3 secs to load, the woes of being an admin
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 06:44:56
|
Either that or you Devs are posting far too many topics in your hidden forums !!
I found focusing on the number of calls to the database was the easiest way to just keep tracking back each query and looking at ways to remove it or reduce it to a single call. I was totally blown away by the number of calls the DB was getting just to show a handfull of topics in active.asp, I absolutely DREAD to think what thats looking like on this forum were you've got what looks to be around another 10,000 or so posts than my forum not archived.
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 07:22:45
|
Yes, that's what I am doing to, I now have it down to 1.5 secs for a normal user, just by doing this
' Does user have access to the forum?? if cLng(Forum_ID) <> cLng(currForum) then testAllow = chkForumAccess(Forum_ID,MemberID,false) end if if testAllow then
instead of
' Does user have access to the forum?? if chkForumAccess(Forum_ID,MemberID,false) then
This reduced the number of queeries on my test from 1856 to 43
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 07:54:31
|
Wow ! Thats a pretty massive saving , I've just this minute finished changing the chkForumAccess routine so its like the ones I've got above and only calls the DB once per page.
I'll make your suggested change now too, which should save my new routine from being excessively called also.
www.daoc-halo.com |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 08:04:47
|
Alright, that helped.
Almost 1300 topics being retrieved from active.asp in 0.8 seconds
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 08:12:57
|
I am now working on reducing the load if ou are an admin, since that is pretty heavy currently, the same active.asp which takes the user 43 queeries takes the admin over 4000
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 25 March 2002 : 08:27:03
|
Yes its nasty isn't it. I'm down to 8 DB calls on my forum regardless of Normal, Mod, or Admin status.
www.daoc-halo.com |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 25 March 2002 : 08:57:17
|
Don't forget however, that on a very busy forum, the extra overhead of storing the info in strings may be more than the actual queeries, they all take up memory.
|
|
|
Aaron S.
Average Member
USA
985 Posts |
Posted - 25 March 2002 : 09:04:27
|
Gremlin:
When you have a chance, can you post the new additions since your last code posting.
I am mucking around also, but don't want to change something that has already been touched.
|
|
|
Topic |
|