phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

I'm going to fork phpbb2

Goto page Previous  1, 2
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 665
Location: Texas


flag
PostPosted: Tue Oct 28, 2014 12:53 pm 
Post subject: Re: I'm going to fork phpbb2

I added a lot of caching to phpBB2, including tables like the config table, smilies, flags, and other items that change very rarely. One thing to understand is you're exchanging one form of I/O for another. Take the config table for an example. If that table is queried on every single page, and changes very seldom, you can write the config file out as an array and simply read it in. That means disk I/O occurs on every page load.

Alternatively, you have to run a query against the database, which would (you would think) require first a database call, and then the database has to go retrieve the information from where it is stored on disk. That would imply that caching the file to disk and reading it directly should be more efficient because it skips the database call.

But if the database is smart and the table is small, then the config table contents are permanently loaded into the database cache which is in memory. Now what is faster: reading direct from disk, or querying the database which is reading from RAM instead?

Ultimately I went ahead and cached the file to disk, but I never really answered that question to my satisfaction. Other small tables (smilies and flags as mentioned above) are treated the same way.

_________________
phpBBDoctor Blog
Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Tue Oct 28, 2014 4:20 pm 
Post subject: Re: I'm going to fork phpbb2

That's true, for simple queries like 'select * from phpbb_config' probably letting mysql do it's job and cache it would be faster... well, in that case that would be true if that table didn't include the rand_seed that is changed often (I moved it to a separate table).
Back to top
StarWolf3000
Board Member



Joined: 10 Jun 2010

Posts: 100
Location: Germany


flag
PostPosted: Sat Nov 01, 2014 12:49 pm 
Post subject: Re: I'm going to fork phpbb2

You can get a tight permance boost on queries if you use MySQL's Views instead of plain SELECTs. This is not needed for data that does not change very often, like the board configuration.

Depending on the intended boards' size, it can be useful to set the prefix__sessions to either MEMORY (for smaller boards) or InnoDB storage engine.
Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Sat Nov 01, 2014 1:00 pm 
Post subject: Re: I'm going to fork phpbb2

Thanks, I'll try that mysql views thing... I'll google it first, I have not heard of it until now icon_mrgreen.gif
Back to top
Vendethiel
Board Member



Joined: 26 Oct 2014

Posts: 78



PostPosted: Sat Nov 01, 2014 5:23 pm 
Post subject: Re: I'm going to fork phpbb2

Quote:
Ultimately I went ahead and cached the file to disk, but I never really answered that question to my satisfaction. Other small tables (smilies and flags as mentioned above) are treated the same way.
There's no way parsing an array is going to be slower than making a request through a network (and back) - In my experience, caching is much much faster !
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Wed May 06, 2015 6:49 am 
Post subject: Re: I'm going to fork phpbb2

How is the progress on this project?!
_________________
Love your data! Back it up!
Back to top
nostro
Board Member



Joined: 16 Jul 2012

Posts: 54


flag
PostPosted: Wed May 06, 2015 3:26 pm 
Post subject: Re: I'm going to fork phpbb2

Just slightly. I'm currently working in two new themes/templates made from scratch for my phpbb forum (one for mobile), once they are finished (one month or so) I'll adapt them to be used in the fork, then I'll continue work in the fork project.
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 2 of 2 All times are GMT
Goto page Previous  1, 2
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0269 seconds using 15 queries. (SQL 0.0025 Parse 0.0009 Other 0.0235)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo