[RC] SQL Cache (Cached Generation)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Doobdee
Registered User
Posts: 209
Joined: Wed Nov 10, 2004 6:43 pm
Location: DooBDee.net
Contact:

[RC] SQL Cache (Cached Generation)

Post by Doobdee »

Greetings,

Introduction :arrow:
This topic is about cached generation time mod on http://www.phpbbstyles.com

Current Version :arrow:
1.2.2

This is a stable version for phpBB 2.x
I am planning to releas final version and submit it to the MOD database very soon.

About :arrow:
This mod is a very powereful mod:
- Caches SQL Queries (faster forum)
- Ads Page generation time (in overall_footer.php)
- Ads SQL querie counter (in overall_footer.php)
- This page generation MOD is highly effecient for forum speed.

Demo :arrow:
Output down the bottom of the page
Image

Example Of XS MOD update checker
Image

Download :arrow:
Version 1.2.2 - Download

Information :arrow:
If you receive any bugs, please report them.
Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')

Optimization
If you want effecient forum, I recommend installing eXtreme Style MOD and this one.
Last edited by Doobdee on Mon Feb 13, 2006 7:44 pm, edited 4 times in total.
DooBDee
Website Ninja
DooBDee.net

da_badtz_one
Registered User
Posts: 376
Joined: Thu Jan 29, 2004 8:25 pm

Post by da_badtz_one »

Excellent mod, I'm extremely happy to see a mod like this made. The one I'm creating contains messier coding. One of the problems which I would surely want this mod have would be that there will be other mods installed on phpBB like subforums which has a changing t.topic_title variable. So making it update every x minutes would be good :)

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny »

It is always great to have mod that speed up your board.
However i'll wait a little bit on 100% stable version and then implemented on my board.It seems that some people on phpBBstyles still have some a minor problems.
Geolocation of any IP address including detection of hostname,
browser, country and country code with ip address range web tool.

IP Address Locator | Email Tracking | IP Address | Check Email

Doobdee
Registered User
Posts: 209
Joined: Wed Nov 10, 2004 6:43 pm
Location: DooBDee.net
Contact:

Post by Doobdee »

Sql queries that involve phpbb_sessions and phpbb_users are not cached. (own data exception).

Others are
DooBDee
Website Ninja
DooBDee.net

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Re: [RC1] SQL Cache (Cached Generation)

Post by deny »

Doobdee wrote: Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')


It will be nice if you can provide this mod for people without phpbbstyles configuration and for people with phpBBstyles configuration.
If you say only "To cache more SQL queries replace $db->sql_query($sql) with..." etc then it can confuse a lot people.
Geolocation of any IP address including detection of hostname,
browser, country and country code with ip address range web tool.

IP Address Locator | Email Tracking | IP Address | Check Email

Doobdee
Registered User
Posts: 209
Joined: Wed Nov 10, 2004 6:43 pm
Location: DooBDee.net
Contact:

Re: [RC1] SQL Cache (Cached Generation)

Post by Doobdee »

deny wrote:
Doobdee wrote: Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')


It will be nice if you can provide this mod for people without phpbbstyles configuration and for people with phpBBstyles configuration.
If you say only "To cache more SQL queries replace $db->sql_query($sql) with..." etc then it can confuse a lot people.


Greetings,

By that I meant, it currently matches that website. Support for modcp.php and groupcp.php will be in next release, which I am planning on being final release.
DooBDee
Website Ninja
DooBDee.net

User avatar
ZombieSlayer
Registered User
Posts: 951
Joined: Sun May 02, 2004 3:18 am
Location: California
Contact:

Post by ZombieSlayer »

Well it doesn't work properly using easymod.

I need to know how to uninstall this mod so that I can install it without using easymod.

Ever since installation the forum is slower and it doesn't show the time or queries in the footer (even after I manually edited the files for my templates [morpheus/subBalck/gen Electro/subSilver]).

I should add that I am not getting any errors and the forums function just fine.

User avatar
ZombieSlayer
Registered User
Posts: 951
Joined: Sun May 02, 2004 3:18 am
Location: California
Contact:

Post by ZombieSlayer »

Ok the slow loading had something to do with the server and not the mod :oops:

However it still doesn't show the time or queries in the footer (even after I manually edited the files for my templates [morpheus/subBalck/gen Electro/subSilver]). :?

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

IMHO, you may prefer inherit from sql_db class rather than editing it : it would allow to be sql engine independant. Take a look how I did it in Categories Hierarchy 2.1.2, it will give you some tips ;).

User avatar
Marnboorapa
Registered User
Posts: 84
Joined: Sat Jan 08, 2005 3:19 pm
Location: Thailand
Contact:

Post by Marnboorapa »

It's my really need mod , but I will wait untill this mod more stable. One thing that I don't love in phpBB is too many queries , and many hosting in my country is not allow phpbb forum.

My requests ::

1. Please make this mod can install without XS system [ many people use phpbb original cache not XS system ] .

2. Reduce useless sql query from original phpbb.


I think this mod is very nice solution for many websites whichs use phpbb forum.

Peter77sx
Registered User
Posts: 3259
Joined: Wed Nov 09, 2005 2:51 pm

Post by Peter77sx »

I installed this MOD a couple months ago. it cuts your queries very low. I would recommend the eXtreme style mod too... makes your phpbb faster. :)

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo »

Peter77sx wrote: I installed this MOD a couple months ago. it cuts your queries very low.


Was there a notable page load time decrease or was there an indication that it was going faster? If so, how long did it take for this to happen? I installed it once but was hasty in uninstalling it because the page generation info in my forum's footer indicated that load time was slower despite less SQL queries being executed. And I felt page loading was a bit slower as I went from page to page seeing if there's a general difference.
I write articles on community building
@ The Infinity Program.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun »

onigumo wrote: I installed it once but was hasty in uninstalling it because the page generation info in my forum's footer indicated that load time was slower despite less SQL queries being executed.

Having fewer queries is not always a good thing. Sometimes two more efficient queries are better than one large query, especially if outer (left or right) joins are involved. I don't know how that relates to the MOD being developed here, as I have not looked at the code. But the rule regarding queries and "less is better" is not 100% true.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

User avatar
Marnboorapa
Registered User
Posts: 84
Joined: Sat Jan 08, 2005 3:19 pm
Location: Thailand
Contact:

Post by Marnboorapa »

But too many queries is a big problem if a forum which has a large database , but I think phpBB is use queries less than phpnuke or other nuke

I think when phpBB 3.0.0 has come we will amazing how it so fast and use few queries.
Last edited by Marnboorapa on Tue Feb 14, 2006 1:37 am, edited 1 time in total.

User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Post by drathbun »

Marnboorapa wrote: But too many queries is a big problem if a forum has a large database

I disagree. :-)

Read the very first post of the Tweaks for Large Forums post in the phpBB Discussion area. One of the tweaks involves breaking a single large query (large meaning it accesses lots of tables) into two more specific queries for performance.

I get the concept of this MOD, and it's a good one. Being able to use the same query results more than once is a great way to save time. Heck, even running the same SQL more than once helps, as MySQL itself has its own query cache. My MySQL query cache hit rate jumped from 76% to 85% with a couple of simple changes I made on my board a while back, and you could see the performance improvement.

But when I see people say "too many queries is bad" I have to comment. To many queries is not bad, too many bad queries is bad. 8)
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image

Post Reply

Return to “[2.0.x] MODs in Development”