Forum Moderators: coopster
I am looking at options for the project I am coding using OOP & flat-file database.
Question I have is regarding the memory & resource management of inlcude() and Read/Write to files.
For example, based on 100kb worth of data:
I gather it would be more memory efficient if data was in smaller chunks i.e. 2kb [x50]. This was on each include(), only 2 kb is included and PHP has to read, write to file or parse 2kb of data.
But on the other hand, PHP may need to open/read/write 5-10 files or more in each exec of script.
Question is:
- Would open/read/write of 10x2 kb be more efficient than open/read/write of 1x100 kb file?
- How would the equation change if data in question was 1000kb and numbers of files used in each exec were 100x2 kb?
I look forward to your comments.
TIA
:)
Alternatively, I guess you could upgrade to PHP5 now and save yourself the trouble. It's on beta 3, so it should be pretty good.
Tom