CARVIEW |
cakephp / cakephp1x
- Source
- Commits
- Network (85)
- Downloads (11)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
Comments for cakephp1x


The ternary operator "?:" can be used in this fashion only PHP 5.3 onwards, so please change it to the traditional (expr1) ? (expr2) : (expr3) format.

Lorenzo, in function name you cached only data that not passed in pregs. I did a commit to put in cache all names in string (most used): https://github.com/jrbasso/cakephp1x/commit/cd6aea04e76034a812742f6a79b5bb63dfd0417b

Very nice this changes! Congratulations.

Mark,
In your skipIf of the new test you write wrong the function name (right is memory_get_usage and no get_memory_usage) and need negate the function_exists or use skipUnless.

I make the patch in commit jrbasso/cakephp1x@58af9e3. The tests run nice and cut about 0.01 second (~4%, but only has 3 tests involving the diff).

Well, I have not tested if it is faster, but in that case it is a bit difficult to decide when to stop looping since next could return false in the case there are no more elements, or if the next element is in fact false!
If you have any patch for this I'm interested in seeing it :)
Thanks again for your interest

Other thing: Instead use each/list in while statement, use current() with next(). Increase 30% of performance.

Taking it was a commit optimization: in preg of string.* in name method I put one explode that no needed. Can you remove? Thanks.

Right. Enhancement to Cake 2.x... :)

I considered doing that, but it broke some tests. Maybe we should consider that later. I'm not really sure if someone is relying on that fuzzy comparison in his app.

Lorenzo, in comparation of while you can use === unless ==. It's more realist (ex.: diff false than 0 or other empty value) and is more faster.

Hmmm, no problems.

I usually don't use i18n calls in the test suite as it can require additional classes to be loaded.

You forgot the internationalization in this commit. :)

I ment $clas variable (single s only, second parameter for addObject())