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)
 Database calls in Active.asp
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 6

GauravBhabu
Advanced Member

4288 Posts

Posted - 25 March 2002 :  09:28:13  Show Profile
That was a lot of calls to the DB. And a very good progress on reducing that. I do not use 3.3 but this is the kind of logic I have on 3.2x


if rs.EOF or rs.BOF then
Rem -No Active Topics Found

else
Rem -Get The List of Moded Forums if Moderator
strModedForumList = ""
if cint(mlev) = 3 then
if strDBNTUserName <> "" then 'not likely though
strModedForumList = GetModedForumList(strDBNTUserName)
elseif Session(strCookieURL & "username")<> "" then
strModedForumList = GetModedForumList(strDBNTUserName)
end if
end if
currTopic = 0
currForum = 0
fDisplayCount = 0
do until rs.EOF
if currTopic <> rs("TOPIC_ID") then
if currForum <> rs("FORUM_ID") then
AdminAllowed = 0
blnPrivateForumAllowed = false
Rem -Display if Admin or Forum Modeartor
if mLev = 4 or ((mLev = 3) and Instr(1, strModedForumList, "," & rs("FORUM_ID") & ",", 1) > 0) then
AdminAllowed = 1 : blnPrivateForumAllowed = true
Rem -Not a Private Forum so display
elseif rs("F_PRIVATEFORUMS")= 0 then
blnPrivateForumAllowed = true
Rem -Private Forum so Check authorization
elseif ChkDisplayPrivateForum(rs("FORUM_ID")) then
blnPrivateForumAllowed = true
end if
end if


Rem -Display the forum Title only if different Forum
if currForum <> rs("FORUM_ID") and blnPrivateForumAllowed then
fDisplayCount = fDisplayCount + 1
Rem -BEGIN Display the Forum Title

if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then
Rem -Display Admin Options
elseif (mLev = 3) then
Rem -Display No Admin Options

end if

end if
Rem -END Display the Forum Title

if blnPrivateForumAllowed then
Rem -Display all the details
----
----
Rem -Reset the variable
currForum = rs("FORUM_ID")
currTopic = (rs("TOPIC_ID"))
end if
end if
Rem -Next Record
rs.MoveNext
loop
if fDisplayCount = 0 then
Rem -No Active Topics Found
end if

end if




www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 25 March 2002 09:45:22
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 25 March 2002 :  09:39:33  Show Profile  Visit Gremlin's Homepage
quote:

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.




Yes thats true. Right now I've got 16bytes per user being used in the strings, and 250 bytes per user being used for another on my test boards here with 29 forums, I'll look for a better way to do that last larger one tomorrow.

quote:
When you have a chance, can you post the new additions since your last code posting.


Aaron I'll post the other changes once I've reduced the overhead of that last string tomorrow sometime.

www.daoc-halo.com
Go to Top of Page

HarshReality
Junior Member

USA
128 Posts

Posted - 12 June 2002 :  14:09:31  Show Profile  Visit HarshReality's Homepage  Send HarshReality an AOL message  Send HarshReality an ICQ Message  Send HarshReality a Yahoo! Message
All this is greek to me, cutting DB calls would be wonderful and I have seen some of the stats for 3.4 on here somewhere and I admit they are very impressive. But honestly its the Snitz "unicorn" (people think it exists, but nobody has seen it or has proof of its existence) I have seen predictions on its release and then when it went over the predications just stopped all together I would personally upgrade rather than continue in an older version just to decrease the calls.

If you guys hold to the Gates method, you'll be releasing 3.4 about the time you can broadcast 3.5

Anti Social Personality
Go to Top of Page
Page: of 6 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