Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] Opcde optimizations

propel
Discussion topic

Back to topic list

Re: [propel-dev] Opcde optimizations

Reply

Author tony_bibbs
Full name Tony Bibbs
Date 2008-09-23 12:59:13 PDT
Message Oh, and of course there would need to be a setting that allowed this level of optimization to be turned on. If not the current behavior would be just fine.



----- Original Message ----
From: Tony Bibbs <tony at tonybibbs dot com>
To: propel-dev <dev at propel dot tigris dot org>
Sent: Tuesday, September 23, 2008 2:56:08 PM
Subject: [propel-dev] Opcde optimizations

First I apologize as I know this is probably an issue discussed before my days on this -dev list.

I'd like to reopen this can of worms:

http://propel.phpdb.​org/trac/ticket/198

The end result of what came out of that ticket is confusing. All I can say is that last I knew opcode caches like APC don't optimize relative paths. So while the I was happy to see the use of require instead of require_once in the stubs, it's useless in the eyes of APC (which is the only opcode cache I use) because it needs an absolute path. I'd like to propose getting around by letting applications register a callback method that retrieves the path to the Propel classes.

We can do this one of two ways:

1) Add the function as a setting in the build properties. It would also have to be added to the runtime conf.
2) Create a callback similar to the way you register_shutdown_function() allowing the application to register the function to call to get the path to the Propel objects

Both would work, I'm less concerned in the approach as I am the result which would be the generator generating code like so in the stubs:

require getPropelPath() . 'BaseBook.php'.

To be 100% clear that will optimize well with APC where this won't

require 'bookstore/om/BaseBook.php';

Thoughts, comments, concerns?

--Tony


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
For additional commands, e-mail: dev-help at propel dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Re: [propel-dev] Opcde optimizations tony_bibbs Tony Bibbs 2008-09-23 12:59:13 PDT
Messages per page: