#41787
11/19/2000 5:31 PM
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
This mod speeds up the OpenThread sub routine. http://www.h-realms.com/openthread.txt Edit ubb_library.pl ------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster. Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop Due to time limitation, I do not offer support Via. E-mail. Please post on the forums. Sincerely, MasterMind
|
|
|
#41788
11/19/2000 6:04 PM
|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
Joined: Aug 2000
Posts: 3,590 |
------------------ Da Wannabe Cannuck:: Who is Andy?
|
|
|
#41789
11/19/2000 6:56 PM
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
Benchmark: timing 100000 iterations of New, Old... New: 24 wallclock secs (18.30 usr + 2.36 sys = 20.66 CPU) Old: 22 wallclock secs (18.61 usr + 2.15 sys = 20.76 CPU)
------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster.
Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop
Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.
Sincerely, MasterMind
|
|
|
#41790
11/19/2000 8:05 PM
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
Hey MM you gotta tell us where to change the code you know...which files do we edit?
------------------ The Fusion of Goku & Trunks...GoTorankusuKu
|
|
|
#41791
11/19/2000 8:51 PM
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
ubb_library.pl
------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster.
Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop
Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.
Sincerely, MasterMind
|
|
|
#41793
11/20/2000 3:34 PM
|
Joined: Jan 2000
Posts: 395
Member
|
Member
Joined: Jan 2000
Posts: 395 |
BEWARE!
If you are using an older version such as 5.39, this code will destroy a thread.
It will delete EVERY POST preceding a new one, and the TOPIC will vanish.
|
|
|
#41794
11/20/2000 7:28 PM
|
Joined: Jul 2000
Posts: 1,349
Member
|
Member
Joined: Jul 2000
Posts: 1,349 |
Nothing Major then? Q: What changed hugely about the thread storage structure from the older version that this mod wrecks?
|
|
|
#41795
11/20/2000 7:59 PM
|
Joined: Jan 2000
Posts: 395
Member
|
Member
Joined: Jan 2000
Posts: 395 |
5.39 code: sub OpenThread { my $ThreadFile = shift; @forumfacts = &GetForumRecord($number); $ThisRestrict = $forumfacts[6]; $ThisPassword = &decodeURL($forumfacts[7]); if ($ThisRestrict eq "private") { $ExactPath = "Forum$number/private-$ThisPassword"; } else { $ExactPath = "Forum$number"; } if ($ThreadFile =~ /^dddddd.cgi$/) { open (MESSAGE, "$ForumsPath/$ExactPath/$ThreadFile"); my @mess = ; close (MESSAGE); my @threadguts = sort(@mess); return(@threadguts);
******************************** New code(pre-hack): sub OpenThread { my $ThreadFile = shift;
@forumfacts = &GetForumRecord($number); $ThisRestrict = $forumfacts[6]; $ThisPassword = &decodeURL($forumfacts[7]);
if ($ThisRestrict eq "private") { $ExactPath = "Forum$number/private-$ThisPassword"; } else { $ExactPath = "Forum$number"; }
if ( ($ThreadFile =~ /^d{6}.(cgi|ubb)$/) || ($ThreadFile =~ /^d{6}-d{6}-d{6}-d{6}.(n|m|msg|nmsg)$/) ) {
open (MESSAGE, "$ForumsPath/$ExactPath/$ThreadFile"); my @mess = ; close (MESSAGE); my @threadguts = sort(@mess); return(@threadguts);
|
|
|
#41796
11/20/2000 9:51 PM
|
Joined: Jan 2000
Posts: 56
Member
|
Member
Joined: Jan 2000
Posts: 56 |
NB:
What are you talking about here? It will destroy what thread? Should be use the code that you have listed (the pre hack one) or what?
I haven't noticed anything happening odd on my board since installing this.
Parker
|
|
|
#41797
11/20/2000 10:40 PM
|
Joined: Sep 2000
Posts: 90
Member
|
Member
Joined: Sep 2000
Posts: 90 |
Parker: I think that NBAustin is just answering Borg_5x8's question. Revuew it and you'll see. If you have a UBB that is no later than 5.39, you shouldn't need to worry, I guess... ------------------ Tolitz (Canis Lupus)Webmaster/Administrator Open Tech Support
|
|
|
#41798
11/20/2000 10:55 PM
|
Joined: Jan 2000
Posts: 395
Member
|
Member
Joined: Jan 2000
Posts: 395 |
Actually, The newer versions should be OK. I don't know in which version the code was changed.
|
|
|
#41799
11/20/2000 10:57 PM
|
Joined: Jan 2000
Posts: 395
Member
|
Member
Joined: Jan 2000
Posts: 395 |
MM,
Will this work if I susbstitute this:
if ( ($ThreadFile =~ /^d{6}.(cgi|ubb)$/) || ($ThreadFile =~ /^d{6}-d{6}-d{6}-d{6}.(n|m|msg|nmsg)$/) ) {
with this?
if ($ThreadFile =~ /^dddddd.cgi$/) {
Evidently this is where the problem lies for older versions such as mine.
|
|
|
#41800
11/21/2000 1:34 AM
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
What does this mean? The cpu result is .1 cpu faster... is that significant? It's looks to make it <.5% faster... Not slamming the modification, just wondering what the difference is... ------------------ Allen - http://www.stand318.com
|
|
|
#41801
11/21/2000 6:39 PM
|
Joined: Aug 2000
Posts: 33
Member
|
Member
Joined: Aug 2000
Posts: 33 |
To support AA, I don't understand the numbers. From what I see, it takes the new code 24 unofficial seconds and 20.66 cpu cycles to run the 100000 iterations, while the old code takes only 22 unofficial seconds and just .01 of a cycle more to run the 100000 iterations. Am I mis-reading something? Or is it trading off cpu work for speed? ------------------ Mike------------------ Visit STCC: stcchat.com
|
|
|
#41802
11/21/2000 7:01 PM
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
You'll notice a medium or small speed increase. Please excuse that benchmark. It is wrong.
NBA, If you substitute those it should work fine. But i dont know when the version changed. Not many people use old versions, and I will not support older versions.
------------------ UBBDEV Moderator OCCUPATION: Programmer, webmaster.
Hack Developer of the Ultimate Bulletin Board. I am not an employee of Infopop
Due to time limitation, I do not offer support Via. E-mail. Please post on the forums.
Sincerely, MasterMind
|
|
|
#41803
11/21/2000 7:46 PM
|
Joined: Jan 2000
Posts: 395
Member
|
Member
Joined: Jan 2000
Posts: 395 |
Thanks MM. I understand not supporting old versions. I appreciate the answers you give as needed.
|
|
|
#41804
11/22/2000 9:05 AM
|
Joined: Aug 2000
Posts: 29
Member
|
Member
Joined: Aug 2000
Posts: 29 |
Ok, I added this mod and one other speed-up mod. Now, My "New Topics Posted Today" displays nothing.
These are the only two mods I have installed recently and everything was fine until now. Anyone have any ideas?
|
|
|
#41805
11/22/2000 12:39 PM
|
Joined: Sep 2000
Posts: 1,304
Addict
|
Addict
Joined: Sep 2000
Posts: 1,304 |
I think it's the "other" speed up hack. I heard one of them caused problems.
------------------ The Fusion of Goku & Trunks...GoTorankusuKu
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|