![]() |
Cache the datastore in the filesystem
Ok, the purpose of this hack is to move the huge parts of the datastore,that are called each time you access a page, into a file unserialized and passed through var_export in order to save the time used to load the data from the database and to unserialize it. If you're using a PHP optimizer, like eAccelerator for example, this may save even more time I think. The result is, that huge arrays, like the forumcache are now loaded simply by executing
PHP Code:
Additionally this saves 4 calls to the function unserialize, which is broken in PHP 5.0.3 and 4.3.10, so this should be a good work around until PHP 5.0.4 and/or PHP 4.3.11 has been released. It tries to finish, what has been started in the code and AFAICS you can even find the beginnings of that in the init.php of vB3.0.6,although I'm still running vB 3.0.3, so I can't tell, that this works without problems in newer versions. Some Notes:
0.8.1 Alpha:
|
Very very very cool. :) I must try this.
|
Hehe, I did that a few days ago ;)
But I think there as not much difference in perfomace, once the bug in unserialize() has been fixed. IIRC can can find discussions about this on vB.com, whre one of the Devs said that this is even slower then using the DB. |
That was what my concern was. But while php 4.3.10 has that serialize bug which does slow my site down, this is a nice workaround.
|
From the guy who runs my host:
Quote:
(I tried this hack but it blew up in my face with foreach errors and stuff...I have apostrophes in my forum descriptions and it caused errors in functions_datastorecache.php ... ) |
Quote:
Quote:
|
i'd like to see a performance ranking on this hack, hit to a db like the one here on vb.org ...
|
I cant found this code in includes/init.php
PHP Code:
I'm using vbulletin 3.0.1 Thanx in advance. |
Mmm... you need to chmod 0777 the includes directory or you get a permission denied. Correct?
|
Okay, got it working 100% with my other hacks. :) Thanks!!! This has helped my multi-server setup. Will wait till we are at peak times and compare...
|
All times are GMT. The time now is 11:05 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|