By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,403 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,403 IT Pros & Developers. It's quick & easy.

does php file size matter?

P: n/a
Hi all,

Quick question... I have a class that is over 1200 lines of code and 50
KB in size. This file does not display any html, it is just included
and after I call all the necessary functions, I save the data and
display it on my output page.

Here is my confusion - to the best of my understanding, since php is
server side, this file should never be "transferred" to the client,
correct? In other words, whether my class is 100 lines or 10,000 lines,
it shouldn't have any affect on my bandwidth or transfer rate should it?
Please correct me if I am wrong, but I have been operating under the
assumption that the only thing that gets transferred to the client is
the php file after it has been parsed for all html formatting, and the
size of this final product is what affects the speed of transfer.

Thanks in advance.
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
That's exact, php parse the file and the web server give the result to the
client... you 1200 lines will never leave the server.

Dae
"Marcus" <Ju********@aol.com> wrote in message
news:JI*******************@newssvr19.news.prodigy. com...
Hi all,

Quick question... I have a class that is over 1200 lines of code and 50 KB
in size. This file does not display any html, it is just included and
after I call all the necessary functions, I save the data and display it
on my output page.

Here is my confusion - to the best of my understanding, since php is
server side, this file should never be "transferred" to the client,
correct? In other words, whether my class is 100 lines or 10,000 lines,
it shouldn't have any affect on my bandwidth or transfer rate should it?
Please correct me if I am wrong, but I have been operating under the
assumption that the only thing that gets transferred to the client is the
php file after it has been parsed for all html formatting, and the size of
this final product is what affects the speed of transfer.

Thanks in advance.

Jul 17 '05 #2

P: n/a
Marcus <Ju********@aol.com> wrote:

Quick question... I have a class that is over 1200 lines of code and 50
KB in size. This file does not display any html, it is just included
and after I call all the necessary functions, I save the data and
display it on my output page.

Here is my confusion - to the best of my understanding, since php is
server side, this file should never be "transferred" to the client,
correct? In other words, whether my class is 100 lines or 10,000 lines,
it shouldn't have any affect on my bandwidth or transfer rate should it?
Please correct me if I am wrong, but I have been operating under the
assumption that the only thing that gets transferred to the client is
the php file after it has been parsed for all html formatting, and the
size of this final product is what affects the speed of transfer.


True.

However, PHP does have to recompile that entire file for every page, unless
you are using a cache/optimizer. That takes time -- possibly a lot of
time.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 17 '05 #3

P: n/a
In article <jc********************************@4ax.com>,
Tim Roberts <ti**@probo.com> wrote:
Marcus <Ju********@aol.com> wrote:

Quick question... I have a class that is over 1200 lines of code and 50
KB in size. This file does not display any html, it is just included
and after I call all the necessary functions, I save the data and
display it on my output page.

Here is my confusion - to the best of my understanding, since php is
server side, this file should never be "transferred" to the client,
correct? In other words, whether my class is 100 lines or 10,000 lines,
it shouldn't have any affect on my bandwidth or transfer rate should it?
Please correct me if I am wrong, but I have been operating under the
assumption that the only thing that gets transferred to the client is
the php file after it has been parsed for all html formatting, and the
size of this final product is what affects the speed of transfer.


True.

However, PHP does have to recompile that entire file for every page, unless
you are using a cache/optimizer. That takes time -- possibly a lot of
time.


This is why I broke my code libraries into functional parts. That way,
each page can require what it needs and only what it needs.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.