Re: read file twice or read into array once?
| From: | John A. Grant | Date: | Fri, 05 Oct 2001 21:22:55 +0000 |
| Subject: | Re: read file twice or read into array once? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70144@lists.php.net to get a copy of this message | ||
"Richard Lynch" <ceo@l-i-e.com> wrote in message
news:046901c14d62$b4c7a0c0$c801a8c0@Lynchux100...
> 100 lines of 200 chars each is 20000 which is 20K which is chump change
for
> RAM...
>
> Unless you are on a super busy page on a super high-volume server, just
> file() it.
>
> If you're on a super busy page on a super high-volume server, file() it
> anyway, and then ap benchmark it to see if it's "slim enough" -- And if
not,
> profile it to be sure it's the file() that's killing you, not something
> else.
I realized it was insignificant amount of memory, but I
wasn't sure about whether this was ok or not in a server
environment. I will use file() and investigate further if it
seems slow. Thanks.
--
John A. Grant * I speak only for myself * (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here