Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
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

Sponsored Links
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
[Linked Image]

------------------
Da Wannabe Cannuck

:: Who is Andy?

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
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

Joined: Sep 2000
Posts: 1,304
Addict
Addict
Offline
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

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
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

Sponsored Links
Joined: Oct 2000
Posts: 76
Member
Member
Offline
Joined: Oct 2000
Posts: 76
Nice!

...Another great "Speed" hack by MasterMind-!
...and Atom911-!

edit = forgot a name [Linked Image]

------------------


Liquid FX Design.com | Ghoste.com | AuctionVilleUSA.com
GamingRC.com | ThrillKillClan.com


This message has been edited by Ghoste on November 20, 2000 at 03:18 AM

Joined: Jan 2000
Posts: 395
Member
Member
Offline
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.

Joined: Jul 2000
Posts: 1,349
Ell Offline
Member
Member
Offline
Joined: Jul 2000
Posts: 1,349
Nothing Major then? [Linked Image]
Q: What changed hugely about the thread storage structure from the older version that this mod wrecks?

Joined: Jan 2000
Posts: 395
Member
Member
Offline
Joined: Jan 2000
Posts: 395
Quote
quote:
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);

Joined: Jan 2000
Posts: 56
Member
Member
Offline
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

Sponsored Links
Joined: Sep 2000
Posts: 90
Member
Member
Offline
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

Joined: Jan 2000
Posts: 395
Member
Member
Offline
Joined: Jan 2000
Posts: 395
Quote
quote:
Actually,

The newer versions should be OK. I don't know in which version the code was changed.

Joined: Jan 2000
Posts: 395
Member
Member
Offline
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.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Quote
quote:

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


- Allen wavey
- What Drives You?
Joined: Aug 2000
Posts: 33
Member
Member
Offline
Joined: Aug 2000
Posts: 33
Quote
quote:
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

Joined: Feb 2000
Posts: 4,625
Member
Member
Offline
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

Joined: Jan 2000
Posts: 395
Member
Member
Offline
Joined: Jan 2000
Posts: 395
Quote
quote:
Thanks MM.

I understand not supporting old versions. I appreciate the answers you give as needed.

Joined: Aug 2000
Posts: 29
ASC Offline
Member
Member
Offline
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?

Joined: Sep 2000
Posts: 1,304
Addict
Addict
Offline
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


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)