phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Modular cron

These requests for comments have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.

Re: [RFC] Modular cron

Postby igorw » Sat Apr 17, 2010 11:51 am

nn- wrote:One thing I'm wondering is why does cron.php need append_sid?

The only reason I can think of is that you can rewrite URLs using an append_sid hook. Other than that it should not be needed.

Small note: class_exists and require are more memory efficient than require_once.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] Modular cron

Postby Oleg » Sat Apr 17, 2010 12:26 pm

eviL3 wrote:Small note: class_exists and require are more memory efficient than require_once.

This is certainly interesting, do you have a url for further reading?
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby nickvergessen » Sat Apr 17, 2010 1:23 pm

nn- wrote:
eviL3 wrote:Small note: class_exists and require are more memory efficient than require_once.

This is certainly interesting, do you have a url for further reading?

Pretty much the same what I said about the include_once you used:
viewtopic.php?p=207366#p207366

php is faster in looking up whether a function/class exists, than checking a the filelist of the included files to see whether a file is already included.
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC] Modular cron

Postby Oleg » Sun Apr 18, 2010 7:52 am

nickvergessen wrote:Pretty much the same what I said about the include_once you used:
viewtopic.php?p=207366#p207366

Not really. eviL3 mentioned memory consumption, your first post gave no reason at all and now you're talking about execution speed.
php is faster in looking up whether a function/class exists, than checking a the filelist of the included files to see whether a file is already included.

My understanding of the issue is *_once functions do symlink resolution via realpath on the filenames they are given, and that accounts for their poor(er) performance. I'm not seeing this behavior on my system though, perhaps it was changed at some point.

What I asked for were links to benchmarks demonstrating the differences or code analysis explaining the difference. I found one post with benchmarks and include took the least amount of memory but the differences were rather miniscule.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby naderman » Sun Apr 18, 2010 9:59 am

www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC] Modular cron

Postby Oleg » Sun Apr 18, 2010 5:52 pm

Update: includes are fixed and *gc* tasks appear to be running via system cron.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby Oleg » Thu May 06, 2010 3:48 am

If anyone wants to help, please test forum pruning via both phpbb cron and system cron.

My testing efforts are on hold until phpbb proving ground is minimally operational, but if it turns out to take too long I will test manually to make the feature cutoff date.

I also want the cron system to be usably documented. Documentation requests and suggestions are welcome.

http://github.com/p/phpbb3/tree/feature/system-cron
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby Oleg » Sun May 09, 2010 9:06 pm

Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby Oleg » Tue Jun 15, 2010 8:35 pm

Is anyone going to bother looking at and maybe committing this code, or have I entirely wasted the time I put into it?
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC] Modular cron

Postby igorw » Wed Jun 16, 2010 2:02 pm

nn- wrote:One thing I'm wondering is why does cron.php need append_sid?

Based on the current set of tasks it should not. Perhaps there are tasks that could take care of something session-based, but I cannot really think of a use case.

nn- wrote:If anyone wants to help, please test forum pruning via both phpbb cron and system cron.

How would one test this via system cron? I didn't see any specific code for this, so would it be something like "curl http://localhost/phpBB/cron.php"?

I have brought my copy phpBB up-to-date and merged develop into feature/system-cron, which gives a bit of a better view on github: http://github.com/evil3/phpbb3/compare/ ... ystem-cron

nn- wrote:I also want the cron system to be usably documented. Documentation requests and suggestions are welcome.

The most important would be a little guide explaining how to create cron tasks, then parameterized tasks. I don't really see the need for additional documentation on the internals. They are already commented pretty well. Perhaps there could be some sort of flow chart describing in what order the methods are called (eg. is parse_parameters() called before X?).

nn- wrote:Is anyone going to bother looking at and maybe committing this code, or have I entirely wasted the time I put into it?

I have looked at it several times. I have not yet had time to test it, it does however looks very good. Most certainly by far more clean and extensible, I like it.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Previous Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 10 guests