close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

optimising speed of code

Thread began 5/10/2012 2:23 pm by Christopher West | Last modified 5/10/2012 4:08 pm by Christopher West | 408 views | 4 replies |

Christopher WestCommunity Expert

optimising speed of code

Hi this is more of a general question regarding all the webassist include files. Does it matter which order the include_once are placed on each page - would arranging them in a certain way benefit access time? for example I have a page with the following:

<?php require_once('Connections/dinkydb.php'); ?>
<?php
require_once( "webassist/framework/library.php" );
require_once( "webassist/framework/framework.php" );
?>
<?php require_once( "webassist/caching/CachedResize_Image.php" ); ?>
<?php require_once( "webassist/security_assist/helper_php.php" ); ?>
<?php require_once("webassist/database_management/wa_appbuilder_php.php"); ?>
<?php require_once("webassist/email/mail_php.php"); ?>
<?php require_once("webassist/email/mailformatting_php.php"); ?>
<?php
if (!WA_Auth_RulePasses("LoggedIn")){
WA_Auth_RestrictAccess("login.php");
}
?>
<?php
//WA eCart Include
require_once("WA_eCart/DinkyCart_PHP.php");
?>
<?php
//WA eCart Include
require_once("WA_eCart/WA_eCart_Database_PHP.php");
?>

Sign in to reply to this post

Jason ByrnesWebAssist

changing the order of the require once lines will have no impact.

Sign in to reply to this post

Christopher WestCommunity Expert

Was just checking I was just thinking this while tiding up my code - I have OCD when it comes to neatness :)

Sign in to reply to this post

Jason ByrnesWebAssist

neatness has nothing to do with how the php processor works.

the php processor processes each line one at a time, down the line from top to bottom.


it's going take just as much time to access the webassist/framework/library.php file for example whether it is the first or last include in the list.

Sign in to reply to this post

Christopher WestCommunity Expert

:) I know that neatness has nothing to do with php processing time....my point was I just like to make my code look neat regardless of speed :) that's when I starting to think about include order. But you already answered that one for me :) Thanks Jason

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...