Customizing SMF > Modifications and Packages
SQLite Cache
nend:
Here is a comparison of how it is doing on one of my sites. Results may vary though depending on how SqLite is setup on the server. The first test on both of them is when the cache directory is empty. Then the last two in the test are when there is something in the cache.
SqLite3 Cache
--- Quote ---Cache hits: 11: 0.02294s for 20333 bytes (
get modSettings: 0.02179s - 0 bytes,
put modSettings: 0.00027s - 12531 bytes,
get user_settings-1: 0.00015s - 0 bytes,
put user_settings-1: 0.00007s - 2235 bytes,
get theme_settings-3:1: 0.00008s - 0 bytes,
get theme_settings-3: 0.00006s - 0 bytes,
put theme_settings-3:1: 0.00005s - 1595 bytes,
get log_online-update: 0.00017s - 0 bytes,
put log_online-update: 0.00004s - 13 bytes,
get menu_buttons-1_4-english: 0.00016s - 0 bytes,
put menu_buttons-1_4-english: 0.00010s - 3959 bytes
)
Cache hits: 5: 0.02837s for 20333 bytes (
get modSettings: 0.02774s - 12531 bytes,
get user_settings-1: 0.00019s - 2235 bytes,
get theme_settings-3:1: 0.00008s - 1595 bytes,
get log_online-update: 0.00015s - 13 bytes,
get menu_buttons-1_4-english: 0.00021s - 3959 bytes
)
Cache hits: 4: 0.01440s for 20316 bytes (
get modSettings: 0.01403s - 12531 bytes,
get user_settings-1: 0.00013s - 2231 bytes,
get theme_settings-3:1: 0.00008s - 1595 bytes,
get menu_buttons-1_4-english: 0.00016s - 3959 bytes
)
--- End quote ---
SMF File Cache
--- Quote ---Cache hits: 11: 0.04824s for 20333 bytes (
get modSettings: 0.02356s - 0 bytes,
put modSettings: 0.00885s - 12531 bytes,
get user_settings-1: 0.00102s - 0 bytes,
put user_settings-1: 0.00261s - 2235 bytes,
get theme_settings-3:1: 0.00027s - 0 bytes,
get theme_settings-3: 0.00045s - 0 bytes,
put theme_settings-3:1: 0.00167s - 1595 bytes,
get log_online-update: 0.00191s - 0 bytes,
put log_online-update: 0.00122s - 13 bytes,
get menu_buttons-1_4-english: 0.00185s - 0 bytes,
put menu_buttons-1_4-english: 0.00483s - 3959 bytes
)
Cache hits: 10: 0.04453s for 22564 bytes (
get modSettings: 0.01707s - 12531 bytes,
get user_settings-1: 0.00509s - 2235 bytes,
get theme_settings-3:1: 0.00229s - 1595 bytes,
get log_online-update: 0.00463s - 13 bytes,
put member_data-profile-1: 0.00122s - 0 bytes,
put member_data-normal-1: 0.00071s - 0 bytes,
put member_data-minimal-1: 0.00254s - 0 bytes,
put user_settings-1: 0.00417s - 0 bytes,
put user_settings-1: 0.00442s - 2231 bytes,
get menu_buttons-1_4-english: 0.00239s - 3959 bytes
)
Cache hits: 12: 0.04272s for 22560 bytes (
get modSettings: 0.00161s - 0 bytes,
put modSettings: 0.00514s - 12531 bytes,
get user_settings-1: 0.00422s - 2231 bytes,
get theme_settings-3:1: 0.00910s - 1595 bytes,
get log_online-update: 0.00953s - 0 bytes,
put log_online-update: 0.00552s - 13 bytes,
put member_data-profile-1: 0.00008s - 0 bytes,
put member_data-normal-1: 0.00003s - 0 bytes,
put member_data-minimal-1: 0.00003s - 0 bytes,
put user_settings-1: 0.00099s - 0 bytes,
put user_settings-1: 0.00372s - 2231 bytes,
get menu_buttons-1_4-english: 0.00277s - 3959 bytes
)
--- End quote ---
If you notice the first cache hit on SqLite3 Cache is always the slowest. This is because the database is still being opened. This is one of the reasons I said after the first couple of hits to the cache the SqLite3 Cache is faster.
However don't look at the total times, compare the individual times in each page load to get a idea of which one is faster.
nend:
Just surpassed myself again, you know when you think it couldn't get any faster and it does. ;D
I am debating on releasing this version. The new version requires an additional feature, I think it is in most PHP setups already though. Introducing ZLib compression in the SQLite3 Cache for SMF. ;D
petgil.net:
Working on New Mods & Themes for SMF... Will update soon
petgil.com
nend:
I am thinking the post above is SPAM.
In any matter I need some test done on the new version that uses compression. I am still deciding the route to go since if I release this as 1.0.5 then there will be one more extra requirement to get it working and that would be the ZLib.
Will here is the file, it is faster, I just need some testing done on it via other systems. Also please note uninstall any previous versions of the cache if you have any before installing this one. ;)
tinoest:
I would suggest a small change to your code to check that the sqlite_ functions exist , the following should work.
You might want to warn them if they don't. Unless you already do before this and i've missed it. :-[
--- Code: ---if(!class_exists('SQLite3') && class_exists('SQLiteDatabase')) {
class SQLite3 {
var $handle;
function SQLite3($data) {
$this->handle = sqlite_open($data);
}
public function exec($data) {
return sqlite_exec($this->handle, $data);
}
public function querySingle($data, $type = false) {
if ($type == true) {$type = false;} else {$type = true;}
return sqlite_single_query($this->handle, $data, $type);
}
public function escapeString($data) {
return sqlite_escape_string($data);
}
public function lastErrorCode() {
return sqlite_last_error();
}
}
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version