Re: [PHP] loading 250kb include files, performance degration?

2004-05-12 Thread raditha dissanayake
Merlin wrote:

Hi there,

I am working on a complex webapp written in php. Recently I was 
reading about performance issues and after analysing the code I found 
that most of the files load 5 external php include files to run. All 
together those include files make about 250KB (there are 5 files).

how about trying out turck MMCache?

--
Raditha Dissanayake.
-
http://www.radinks.com/print/upload.php
SFTP, FTP and HTTP File Upload solutions 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] loading 250kb include files, performance degration?

2004-05-11 Thread Justin French
Merlin,

All I can suggest is that you attempt to restructure the include files 
on the next version of the app, so that the functions and includes are 
broken in the most logical manner possible (by task or topic for 
example), so that you're only including the bare minimum of files for 
each request/screen of the app, rather than including a whole bunch of 
stuff that may not be needed on every request.

As an example, you might have an include file dedicated to file 
uploads, which might be 10 or 20k.  It's pointless to include such a 
file on every request, since it's only required by a small 
module/section of the site.  Same goes for your login functions (which 
are only required on login and logout), your form validation libraries 
(only required when there's a form to validate), etc etc.

You may also decide it's not worth the work... to bench mark, make a 
copy of all the code necessary to have a certain part of the site 
function, but without grabbing anything unnecessary.  Run the site with 
the big includes (250k) and run the stripped down version a few times 
each (using microtime() for timing it), and compare the results.

If even that sounds like too much work, you may be able to fabricate a 
test case using dummy functions and code, which may give some accurate 
answers, or may not :)

On 12/05/2004, at 1:44 AM, Merlin wrote:

Hi there,

I am working on a complex webapp written in php. Recently I was 
reading about performance issues and after analysing the code I found 
that most of the files load 5 external php include files to run. All 
together those include files make about 250KB (there are 5 files).

Now I am wondering if loading 250KB on include files, each time a page 
= php script is called, is slowing down the webapplication a lot or 
not. Is this even
noticable while surfing the site. I am wondering about response times 
since I found them a bit slow (the time I click on the link until the 
page starts to display).

Thank you for any advice,

Merlin

PS: The system is a p4 2.4G with 1G RAM and about 500.000PI a month.


---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] loading 250kb include files, performance degration?

2004-05-11 Thread Matt Matijevich
[snip]
I am working on a complex webapp written in php. Recently I was reading
about 
performance issues and after analysing the code I found that most of
the files 
load 5 external php include files to run. All together those include
files make 
about 250KB (there are 5 files).
[/snip]

The more code php has to compile, the longer it will take.  

Do you need all of the includes on each page?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] loading 250kb include files, performance degration?

2004-05-11 Thread Merlin
Hi there,

I am working on a complex webapp written in php. Recently I was reading about 
performance issues and after analysing the code I found that most of the files 
load 5 external php include files to run. All together those include files make 
about 250KB (there are 5 files).

Now I am wondering if loading 250KB on include files, each time a page = php 
script is called, is slowing down the webapplication a lot or not. Is this even
noticable while surfing the site. I am wondering about response times since I 
found them a bit slow (the time I click on the link until the page starts to 
display).

Thank you for any advice,

Merlin

PS: The system is a p4 2.4G with 1G RAM and about 500.000PI a month.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php