Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Give Feedback (Read 17677 times)
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Give Feedback
Apr 11th, 2002 at 9:26pm
Print Post  
If you encount any speed improvement at the forum then please tell me, I'm currently testing some stuff here which may boost up at least a little bit. Thx Smiley
  

The Administrator.
Back to top
WWW  
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: Give Feedback
Reply #1 - Apr 11th, 2002 at 11:20pm
Print Post  
today is going pretty fast compared to normal.. though yabbforum always seems that tad faster.. maybe cause of the layout Wink
  

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Back to top
IP Logged
 
DemonSlayer
God Member
*****
Offline


I am the face of pure
evil!

Posts: 1398
Joined: Jul 26th, 2001
Gender: Male
Re: Give Feedback
Reply #2 - Apr 12th, 2002 at 2:08am
Print Post  
It does seem faster

hopefully it will stay this way



BTW what are u doiong?
  
Back to top
ICQAIM  
IP Logged
 
Ken
Junior Member
**
Offline



Posts: 72
Joined: Jul 25th, 2001
Gender: Male
Re: Give Feedback
Reply #3 - Apr 12th, 2002 at 10:44am
Print Post  
It seems much faster to me. Sometimes I have to wait for the pages to load but not last night or this morning.

Well done. Smiley
  

Ken
Back to top
WWW  
IP Logged
 
Carsten
Ex Member
*****


...to much YaMS

Gender: Male
Re: Give Feedback
Reply #4 - Apr 13th, 2002 at 5:13am
Print Post  
It's to fast - now i have to read posts before i click a link

*GJ*  Smiley
  
If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
rehlbe
God Member
*****
Offline


Juve Merda

Posts: 614
Joined: Feb 1st, 2002
Gender: Male
Re: Give Feedback
Reply #5 - Apr 13th, 2002 at 8:12am
Print Post  
Man, what in the world have u done to this forum???
its actually fastest than yabbse forums in yabb.info !!!!!!!!!  Shocked
  

www.rehlbe.com
Current task -> rewriting website.
Per un aiuto in italiano contattami tramite il mio forum!

Installed Mods = 82
Milan forever
Back to top
IP Logged
 
D2N
Full Member
***
Offline



Posts: 201
Joined: Jul 11th, 2001
Re: Give Feedback
Reply #6 - Apr 13th, 2002 at 10:03am
Print Post  
Grin Performance is great now !!!
  

Notify Plus 2.2.1 is ready ! Download it here
Back to top
 
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: Give Feedback
Reply #7 - Apr 13th, 2002 at 4:31pm
Print Post  
dude, its blazing now... and yesterday. please tell me what ya done! Wink
  

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Back to top
IP Logged
 
Tea-Master
Forum Administrator
*****
Offline



Posts: 1945
Location: north germany
Joined: Oct 21st, 2001
Gender: Male
Re: Give Feedback
Reply #8 - Apr 13th, 2002 at 4:42pm
Print Post  
i observed the speed since yesterday and i can realy say:

The Speed is unbelieveable great!
if you remember how slow it sometimes was...  Grin
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Give Feedback
Reply #9 - Apr 13th, 2002 at 4:47pm
Print Post  
I had to sacrifice something... still wanna hear? Grin
  

The Administrator.
Back to top
WWW  
IP Logged
 
Michael
God Member
*****
Offline


Recursion \Re*cur"sion\,
n. - See recursion.

Posts: 1003
Joined: Oct 23rd, 2001
Gender: Male
Re: Give Feedback
Reply #10 - Apr 13th, 2002 at 4:51pm
Print Post  
Yeh, let's go. 8)
  

~ Michael ~
-------------
The MikeCam
A truly wise man never plays leapfrog with a unicorn.
Back to top
IP Logged
 
Carsten
Ex Member
*****


...to much YaMS

Gender: Male
Re: Give Feedback
Reply #11 - Apr 13th, 2002 at 4:54pm
Print Post  
No pain, no gain - XXL tell us more...
  
If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
rehlbe
God Member
*****
Offline


Juve Merda

Posts: 614
Joined: Feb 1st, 2002
Gender: Male
Re: Give Feedback
Reply #12 - Apr 13th, 2002 at 4:55pm
Print Post  
come on man!!

ps so fast and you've also included attachments: this board rocks!!
  

www.rehlbe.com
Current task -> rewriting website.
Per un aiuto in italiano contattami tramite il mio forum!

Installed Mods = 82
Milan forever
Back to top
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: Give Feedback
Reply #13 - Apr 13th, 2002 at 5:10pm
Print Post  
lowered clicklog time?
  

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Back to top
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Give Feedback
Reply #14 - Apr 13th, 2002 at 5:49pm
Print Post  
Hehe ok lets start with the idea:

Let's take a look into YaBB.pl. What we have in there is the most important part of the board. Why? Because ALL stuff in there will be called every time the forum gets a hit. No matter if someone is viewing boardindex, messageindex, a thread or does anything else like marking something as read.

Now what are the slowest perl code parts in general? There are two things which come into mind:
- loops
- file access

Now where do we have that in YaBB.pl?
Well a lot of stuff access files. But there is a place where we have really a lot of it:
Code
Select All
&LoadCookie;		# Load the user's cookie (or set to guest)
&LoadUserSettings;	# Load user settings
&banning;		# Check for banned people
&WriteLog;		# Write to the log
&LoadIMs;		# Load IM's
if($currentboard ne "") { &LoadBoard; }		# Load board information 



Now there is a lot of essential stuff in there, but not really all:
Code
Select All
&WriteLog;
 


hm Writelog is pretty essential, eh? Lets take a look at the sub, it's located in Subs.pl:

Code
Select All
sub WriteLog {
	my($curentry, $name);
	my $field = $username;
	if($field eq "Guest") { $field = "$user_ip"; }

	fopen(LOG, "$vardir/log.txt");
	my @online = <LOG>;
	fclose(LOG);
	fopen(LOG, ">$vardir/log.txt", 1);
	print LOG "$field|$date\n";
	foreach $curentry (@online) {
		$curentry =~ s/\n//g;
		($name, $date1) = split(/\|/, $curentry);
		$date2 = $date;
		chomp $date1;
		chomp $date2;
		&calctime;
		if($name ne $field && $result <= 15 && $result >= 0) { print LOG "$curentry\n"; }
	}
	fclose(LOG);

	fopen(LOG, "+<$vardir/clicklog.txt",1);
	my @entries = <LOG>;
	seek LOG, 0, 0;
	truncate LOG, 0;
	print LOG ";
	foreach $curentry (@entries) {
		$curentry =~ s/\n//g;
		chomp $curentry;
		($name, $date1, $dummy) = split(/\|/, $curentry);
		$date2 = $date;
		chomp $date1;
		chomp $date2;
		&calctime;
		if($result <= $ClickLogTime && $result >= 0) { print LOG "$curentry\n"; }
	}
	fclose(LOG);
}
 



What do we have there:
Code
Select All
...
fopen(LOG, "$vardir/log.txt");
...
fopen(LOG, ">$vardir/log.txt", 1);
...
fopen(LOG, "+<$vardir/clicklog.txt",1);
 


So we have 3 file access in here. Those 3 files get accessed all the time. That's crappy, eh?

So what can be done? We have multiple options.
We can remove who is online and clicklog completely. That will definitively boost up most. But who would forego "who is online"? So what other option do we have? We can limit the call of this function:
Code
Select All
if ($action eq "") { &WriteLog; } 

This code will cause YaBB only to log people if they access either the boardindex or the message index. This won't affect the who is online log too much but will reduce the file access a lot. Now to even increase the stpeed, we remove the clicklog part completely. This is  however a relinquishment but I think that this is ok because it will speed up most.

So a mod for all this changes would look like this:

Code
Select All
<edit file>
YaBB.pl
</edit file>

<searchfor>
&WriteLog;		# Write to the log
</searchfor>

<replace>
if ($action eq "") { &WriteLog; }
</replace>

<edit file>
Sources/Subs.pl
</edit file>

<searchfor>
sub WriteLog {
	my($curentry, $name);
	my $field = $username;
	if($field eq "Guest") { $field = "$user_ip"; }

	fopen(LOG, "$vardir/log.txt");
	my @online = <LOG>;
	fclose(LOG);
	fopen(LOG, ">$vardir/log.txt", 1);
	print LOG "$field|$date\n";
	foreach $curentry (@online) {
		$curentry =~ s/\n//g;
		($name, $date1) = split(/\|/, $curentry);
		$date2 = $date;
		chomp $date1;
		chomp $date2;
		&calctime;
		if($name ne $field && $result <= 15 && $result >= 0) { print LOG "$curentry\n"; }
	}
	fclose(LOG);

	fopen(LOG, "+<$vardir/clicklog.txt",1);
	my @entries = <LOG>;
	seek LOG, 0, 0;
	truncate LOG, 0;
	print LOG ";
	foreach $curentry (@entries) {
		$curentry =~ s/\n//g;
		chomp $curentry;
		($name, $date1, $dummy) = split(/\|/, $curentry);
		$date2 = $date;
		chomp $date1;
		chomp $date2;
		&calctime;
		if($result <= $ClickLogTime && $result >= 0) { print LOG "$curentry\n"; }
	}
	fclose(LOG);
}
</searchfor>

<replace>
sub WriteLog {
	my($curentry, $name);
	my $field = $username;
	if($field eq "Guest") { $field = "$user_ip"; }

	fopen(LOG, "$vardir/log.txt");
	my @online = <LOG>;
	fclose(LOG);
	fopen(LOG, ">$vardir/log.txt", 1);
	print LOG "$field|$date\n";
	foreach $curentry (@online) {
		$curentry =~ s/\n//g;
		($name, $date1) = split(/\|/, $curentry);
		$date2 = $date;
		chomp $date1;
		chomp $date2;
		&calctime;
		if($name ne $field && $result <= 15 && $result >= 0) { print LOG "$curentry\n"; }
	}
	fclose(LOG);
}
</replace>
 

  

The Administrator.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint