You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 262 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Speedup mainfile.php [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Poll :: This speed upgrade was usefull for me ?

Yes
61%
 61%  [ 64 ]
A bit
26%
 26%  [ 28 ]
No
11%
 11%  [ 12 ]
Total Votes : 104


Author Message
affiliate
Nuke Cadet
Nuke Cadet


Joined: Apr 21, 2004
Posts: 7


PostPosted: Thu Apr 22, 2004 9:02 am Reply with quoteBack to top

I tried this and I get ....

Code:
Parse error: parse error in /home/phonefun/public_html/mainfile.php on line 213

Fatal error: Call to a member function on a non-object in /home/phonefun/public_html/index.php on line 18


line 213 is
Code:

function is_admin($admin) {
Find all posts by affiliateView user's profileSend private message
bretonmage
Captain
Captain


Joined: Feb 21, 2004
Posts: 421


PostPosted: Thu Apr 22, 2004 12:03 pm Reply with quoteBack to top

Without any fixes = 1.959 Seconds

With the first set of fixes = 1.749 Seconds

With the second fix = 1.408 Seconds

Very Happy GJ djmaze! That has knocked down page load times by around 25%!
Find all posts by bretonmageView user's profileSend private message
Jag_Rambo
Nuke Cadet
Nuke Cadet


Joined: Apr 23, 2004
Posts: 1


PostPosted: Fri Apr 23, 2004 1:35 am Reply with quoteBack to top

I love that tweak...I run PHP-Nuke 7.2 with all security patchs and protector 1.5 installed

Before Sad

Local Connection 1.837
T-1 Remote Connection 8.457

After Tweak Laughing

Local Connection 0.533
T-1 Remote Connection 2.337

Big Difference
Find all posts by Jag_RamboView user's profileSend private message
Jeruvy
Lieutenant
Lieutenant


Joined: Jul 09, 2003
Posts: 293


PostPosted: Fri Apr 23, 2004 5:56 am Reply with quoteBack to top

I dunno...I'm in the same boat. Moved a site over, rebuilt my test server from the ground up, and have been reinstalling all my gear, and making backups like crazy.

cpgnuke was down for a while also due to hosting issues. I'm not sure if they have been resolved. I grabbed the latest release, and it looks good except for a couple little bugs. Impressively, my nuke 7.0 test site generates main page in .567 seconds, and cpgnuke generates in 0.073 seconds. Impressive difference.

_________________
J.
j e r u v y a t y a h o o d o t c o m
Find all posts by JeruvyView user's profileSend private messageICQ Number
Kinetix
Corporal
Corporal


Joined: Aug 16, 2003
Posts: 52


PostPosted: Sat Apr 24, 2004 9:23 am Reply with quoteBack to top

Wow this is excellent! Thanks a lot. My news page's generation time is a lot better now.

Before: Page Generation: 0.441 Seconds

After: Page Generation: 0.322 Seconds
Find all posts by KinetixView user's profileSend private messageVisit poster's website
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Sun Apr 25, 2004 4:38 am Reply with quoteBack to top

DJ, One quick question.. Is this updated for the new 7.2 sql layer?

If its not can you re write a seprate one
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
djmaze
Captain
Captain


Joined: Nov 29, 2003
Posts: 566

Location: Netherlands

PostPosted: Sun Apr 25, 2004 8:41 am Reply with quoteBack to top

Rainbow Brite wrote:
DJ, One quick question.. Is this updated for the new 7.2 sql layer?

If its not can you re write a seprate one


7.2 sql layer ? LMAO

7.2 has no new layer, FB just changed all $dbi queries to $db which should have be done ages ago in 6.x like we did in cpgnuke last january

_________________
Famous people never give their signature Rolling Eyes
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please Exclamation
Find all posts by djmazeView user's profileSend private messageVisit poster's website
clam729
Sergeant
Sergeant


Joined: Aug 18, 2003
Posts: 82


PostPosted: Sun Apr 25, 2004 9:35 am Reply with quoteBack to top

wow - amazing stuff. i am still using a heavily mod'd 6.0 install. could you give me one example of your code for this (i'll post the old code), and i can go the rest. i just need a little help getting started.

function is_active($module) {
global $prefix, $dbi;
$result = sql_query("select active from web_modules where title='$module'", $dbi);
list ($act) = sql_fetch_row($result, $dbi);
if (!$result OR $act == 0) {
return 0;
} else {
return 1;
}
}

im hoping that i can take advantage of the speedups also.
thanks.
Find all posts by clam729View user's profileSend private message
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Mon Apr 26, 2004 11:04 am Reply with quoteBack to top

Ok nvm then im just crazy some times.
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
djmaze
Captain
Captain


Joined: Nov 29, 2003
Posts: 566

Location: Netherlands

PostPosted: Mon Apr 26, 2004 11:23 am Reply with quoteBack to top

Rainbow Brite wrote:
Ok nvm then im just crazy some times.

NP problem mate Wink everyone is crazy most of the time or we wouldn't drive a car

_________________
Famous people never give their signature Rolling Eyes
http://www.cpgnuke.com <- back online thanks to dedicatednow.com
Don't ask me to be admin on your site please Exclamation
Find all posts by djmazeView user's profileSend private messageVisit poster's website
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Mon Apr 26, 2004 11:33 am Reply with quoteBack to top

Its that squirrel weed again.. Gets to me every once and a while... Laughing
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
shayan_he
Nuke Soldier
Nuke Soldier


Joined: Apr 23, 2004
Posts: 13


PostPosted: Mon Apr 26, 2004 12:34 pm Reply with quoteBack to top

wow Surprised
from 2.5 to 0.9
Surprised Surprised Surprised
Find all posts by shayan_heView user's profileSend private message
Stephen2417
Major
Major


Joined: Dec 26, 2003
Posts: 1135

Location: Bristolville, OH (US)

PostPosted: Tue Apr 27, 2004 7:07 am Reply with quoteBack to top

Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked
Cool Shocked Cool Cool Cool Shocked Cool Shocked Cool Cool Cool Shocked Cool
Cool Cool Shocked Cool Shocked Cool Cool Cool Shocked Cool Shocked Cool Cool
Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool

Cool Cool Cool Cool Shocked Shocked Shocked Shocked Shocked Cool Cool Cool Cool
Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool
Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool
Cool Cool Cool Cool Shocked Shocked Shocked Shocked Shocked Cool Cool Cool Cool

Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked
Cool Shocked Cool Cool Cool Shocked Cool Shocked Cool Cool Cool Shocked Cool
Cool Cool Shocked Cool Shocked Cool Cool Cool Shocked Cool Shocked Cool Cool
Cool Cool Cool Shocked Cool Cool Cool Cool Cool Shocked Cool Cool Cool


Smile Art Copyright © 2004 by DJMaze ~ Recreated By Rainbow Brite Rolling Eyes

What can I say.. I had nothing better to do....
Find all posts by Stephen2417View user's profileSend private messageSend e-mailVisit poster's websiteAIM Address
Darby_2k4
Nuke Soldier
Nuke Soldier


Joined: Apr 15, 2004
Posts: 32


PostPosted: Thu Apr 29, 2004 5:03 am Reply with quoteBack to top

I did some testing on my site to see if the changes would help. Here are the results. I hope they help you out.

Test Notes
All ten tests were done with the same page, with the same number of users online (according to the Users Info block), and the same theme(smartDark -> a bit of graphics, not image intensive). I was logged in only as a registered user, not an admin. The module was a hand created one that pulled out 30 pieces of information from the database using 7 seperate queries(five of those queries were from a handmade function called get_myValue($valTable, $valField, $valKeyword, $wnSearch='uid') which is used to pull just one value out of the table...so I know that the speed could be improved more by using the $db -> sql_query more efficiently, but I prefer the easier readability and lessened coding of using one function for grabbing a value or two. I use the $db class whenever I need a lot of values and can join the tables properly).

Blocks on the page were -
:: Sommaire Paratable(aka Customize Menu 2.0).
:: Membership (ourscripts.net version of User Info/Login)
:: Old Articles (standard from PHPNuke)
:: Themes! (an on-the-fly theme selector from phpnukefiles.com)
:: Protector 1.1.5.1b with fixed blocker.php
:: and the query-hogging Survey (standard from PHPNuke).

The only modifications made by me to the mainfile before this was to add in the PROTECTOR required line, and the UTC Beta 4.

End Test Notes

Test # | Original | First Set Changes | Second Set Changes

1 | 0.729 | 0.341 | 0.201
2 | 0.252 | 0.330 | 0.462
3 | 0.416 | 0.268 | 0.194
4 | 0.444 | 0.216 | 0.258
5 | 0.402 | 0.351 | 0.195
6 | 0.264 | 0.247 | 0.198
7 | 0.256 | 0.225 | 0.193
8 | 0.250 | 0.327 | 0.193
9 | 0.346 | 0.359 | 0.193
10 | 0.306 | 0.387 | 0.195

Total | 3.665 | 3.051 | 2.282

Avg | 0.367 | 0.305 | 0.228

So it seems to have helped quite a bit. I will do another test when my site is at peak usage, if desired, and get you those results as well. (DJMaze - I sent you a PM.....should I redirect that question to your other site?)
Find all posts by Darby_2k4View user's profileSend private message
jqcastillo
Nuke Cadet
Nuke Cadet


Joined: Sep 23, 2003
Posts: 7


PostPosted: Fri Apr 30, 2004 11:04 pm Reply with quoteBack to top

when using the following function:

Code:
function getusrinfo($user) {
    global $user_prefix, $db, $userinfo;
    static $userrow;
    if (!$user || $user == '') { return NULL; }
    if(!is_array($user)) {
        $user = base64_decode($user);
        $user = explode(":", $user);
    }
    if (is_array($userrow)) {
        if ($userrow['username'] == $user[1] && $userrow['user_password'] = $user[2]) {
            return $userrow;
        }
    }
    $sql = "SELECT * FROM ".$user_prefix."_users WHERE username='$user[1]' AND user_password='$user[2]'";
    $result = $db->sql_query($sql);
    if ($db->sql_numrows($result) == 1) {
        $userrow = $db->sql_fetchrow($result);
        return $userinfo = $userrow;
    }
    unset($userinfo);
}


the system wouldnt let me add any new block, showing an error on the file blocks.php in line 342, the code in that line is the following:

Code:
$title = stripslashes(FixQuotes($title));


I'm running PHP-Nuke 7.2, i tried replacing the function add new blow with the same fuction in the cpgnuke, it wouldn't show up any errors but it wouldn't save the new block either, i had to leave the normal code for that function, i just thought this could be of interest for you guys, BTW now the survey block doesn't allow anybody to vote and sends the users to the "your account" page, any ideas of what this might be?, thx
Find all posts by jqcastilloView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.049 Seconds - 357 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::