SQL Speedup patch / Plugin API performance
Thanks to Isotopp I discovered today that the load_plugin() method of the Plugin API did perform some unneccessary SQL queries when loading/searching for a plugin.
I have created this patch (can be applied to both 0.9 SVN and 0.8.1) - it will properly detect the plugin path setting and now only perform the SQL query when needed.
This should cut down one SQL query per plugin that is loaded; in a standard install with 14 plugins this is 14 less SQL queries. But thanks to MySQL and other caching systems, the impact of those superfluous small queries is not that large.
The patch will be part of a possible 0.8.2 release and has been committed to the CVS backport and SVN branches already.
(Update: Some more changes to the patch)
Trackbacks
Trackback-URL für diesen Eintrag
- Die wunderbare Welt von Isotopp am : S9Y Tuning
Kommentare
Ansicht der Kommentare: (Linear | Verschachtelt)
Ryan am um :
Hi Garvin,
I apologize for my lack of knowledge. How do I use this patch?
Garvin am um :
There's a utility called "patch" with which you can apply the file. Copy+Paste the patch and save it as "api.diff". Go to your s9y directory and there use the "patch < api.diff" command.
You need to use a SSH or console application for this, it will not work if you only have FTP access; either way, the patch is more suited for people that know about patch/diff; for all other users an official release containing this patch will be made.
Regards, Garvin
Mandrake am um :
Hello Garvin, talking about caching systems...
I noticed that "CacheSimple" is very effective for performance as I told you before on the forums, but when the cache files are too many the server slows down a lot, so I started looking for any issue like this with "Pear::Cache_Lite" and I found one thread: http://pear.php.net/bugs/bug.php?id=2820
I know the bundled "Cache_Lite" is newer, but there are two options I just applied and it seems to be working faster:
'lifeTime' => 1800, 'hashedDirectoryLevel' => 2
You can see if it works tomorrow at rush hour, if my Blog isn't suspended then it worked :S... Have a nice day!
Mandrake am um :
And Ryan... I think that replacing your "pluginapi.inc.php" with one in the latest nightly download would be your easy way to patch. Just downlod the latest 0.9 tarball and upload "include/pluginapi.inc.php" to your Blog, I used the one in "s9y_200505191337.tar.gz".
Dragoning am um :
can this style be provided to download?