Reduced the #calls of rawurlencode() using a cache mechanism#3045
Reduced the #calls of rawurlencode() using a cache mechanism#3045ezimuel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
var name should not start with underscores
There was a problem hiding this comment.
Our CS allows it; we use it in several places where the functionality is an
implementation detail we want to call out as something to avoid modifying.
On Wednesday, November 21, 2012, Maks wrote:
In library/Zend/Mvc/Router/Http/Segment.php:
@@ -25,6 +25,11 @@
class Segment implements RouteInterface
{
/**
\* @var array Cache for the encode output*/- private static $__cacheEncode = array();
var name should not start with underscores
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/3045/files#r2198911.
Matthew Weier O'Phinney
[email protected]
http://mwop.net/
There was a problem hiding this comment.
For me the private visibility is enough since forbid "unauthorized" modifications in extended classes
- Remove double underscore prefix
|
Renamed variable on merge, per note from @Maks3w |
This patch reduce the #calls of the rawurlencode() for the Zend\Mvc\Router\Http\Segment->encode(). In the zf2-tutorial application this reduce the rawurlencode() calls from 181 to 48 with a reduction of 1% of the total response time.