Re: System wide variable
| From: | Darren Whitlen | Date: | Fri, 25 May 2007 13:12:29 +0000 |
| Subject: | Re: System wide variable | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255624@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
On Wed, May 23, 2007 4:27 am, Darren Whitlen wrote:Finaly managed to get it going (uses AJAX which im not to great at..), and the database memory engine seems to be holding up fine. When it was reading/writing frm the file, after a short while I would start getting "file is in use" errors which using mysql now solves.John Comerford wrote: Not thought about the memory engine actually. Will give that a try and see how it turns out.Let us know.
I'd have GUESSED that MySQL would have just cached something that small and oft-used in RAM anyway, so a MySQL memory engine table wouldn't perform any better than the MySQL half of things. Better than the File System, probably, though that also may be getting cached...I'm changing the yShout script (http://yurivish.com/yshout/) so that it reads from a database, rather than the tx file it originaly used. And my bad, it checks the database every 3 seconds, not .5 :)Think I'll leave the session_id idea then, if it locks it down per-script, the performance will pretty much die.It won't be any better than your own file-system calls, but you could do: <?php session_start(); //read-write $_SESSION here session_write_close(); //don't touch session here ?> And it probably won't be any worse than the locking you presumably already have in your code... WHy is it sometimes MySQL and sometims file system?