Fwd: apc optimizations
[email protected] (Edin Kadribasic) Sun, 14 Jan 2007 23:00:31 +0100
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
Forwarding to [email protected]. -------- Original Message -------- Subject: apc optimizations Date: Sun, 14 Jan 2007 03:25:24 -0200 From: Roberto Spadim <[email protected]> To: [email protected] hello see my code first: <? $new_file='/tmp/tmpfile'; if (!file_exists($new_file)){ $read=''; $files=array( many php files ); foreach($files as file) $read.=file_get_contets($file); file_put_contents($newfile,$read); } include($newfile); ?> that's the fastest way that i got to include many files, since reading file we need access a disk or get from "ramfs" or "tempfs" we have about ~1 ms for pentium 3 machine to read that file could we implement an apc_fetch_and_eval() ? for example, we apc_put() some variable and eval it when it exists, i don't do it with eval(file_get_contents) because eval is slower than include, can we optimize this code? thankx (i didn't found the apc developer list)