471,319 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

one large, or many small files?

I'm asking: for the PHP parser, it's better to create one large file
with all the code inside or a lot of small files?
Can a large file slow down the execution of the script?

Oct 4 '05 #1
2 2558
ma***********@gmail.com wrote:
I'm asking: for the PHP parser, it's better to create one large file
with all the code inside or a lot of small files?
Can a large file slow down the execution of the script?


One large file doesn't necessarily slow down the execution of the
script, that comes all down to what the code inside it does.

However, a lot of smaller files does have the advantage that the whole
solution is easier to maintain, and you're able to re-use code in other
scripts without having to insert the same code segment inside every
main script.

Also, uploading a large script creates downtime in the time period
you're uploading the script, depending on the file size of the single
script and your own upload speed.

--
Kim André Akerĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Oct 4 '05 #2
JDS
On Tue, 04 Oct 2005 04:04:11 -0700, marco.avidano wrote:
I'm asking: for the PHP parser, it's better to create one large file
with all the code inside or a lot of small files?
Can a large file slow down the execution of the script?


Don't worry about it. Speed differences will be negligible.

From a programming practice point of view, though, multiple include()ed
files often make a large project easier to build and maintain. All of
your functions in one file, an HMTL header and footer in others,
business logic in still others...

Programming practices Haiku

Keep style consistent
Use comments, annotation
Remember to reuse code
later...
--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Oct 4 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

36 posts views Thread by Andrea Griffini | last post: by
14 posts views Thread by Jason Heyes | last post: by
11 posts views Thread by CSN | last post: by
4 posts views Thread by =?Utf-8?B?VzFsZDBuZTc0?= | last post: by
36 posts views Thread by sh.vipin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.