rfc:aliases_by_reflection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:aliases_by_reflection [2014/10/10 21:29] – Fix a typo vranarfc:aliases_by_reflection [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2014-10-09   * Date: 2014-10-09
   * Author: Miloslav Hůla, <miloslav.hula@gmail.com>   * Author: Miloslav Hůla, <miloslav.hula@gmail.com>
-  * Status: Draft+  * Status: Voting
   * First Published at: http://wiki.php.net/rfc/aliases_by_reflection   * First Published at: http://wiki.php.net/rfc/aliases_by_reflection
 +  * Discussion: http://news.php.net/php.internals/77917 ([[http://php.markmail.org/thread/oqcifqndca4a5tj6|thread]])
 +  * Vote discussion: http://news.php.net/php.internals/79186 ([[http://php.markmail.org/thread/5af5hxqkkncu6d7v|thread]])
  
  
Line 111: Line 113:
 Method ''getDefinedAliases()'' exists on ''ReflectionMethod'' class too due to inheritance. But adding class methods does not increase memory consumption, because aliases definition is internally kept only for class. Method ''getDefinedAliases()'' exists on ''ReflectionMethod'' class too due to inheritance. But adding class methods does not increase memory consumption, because aliases definition is internally kept only for class.
  
 +==== Measurements ====
 Five measurements on real libraries and application follow. Five measurements on real libraries and application follow.
  
 The first two measurements are done on Nette Framework v2.2.3 and Symfony Framework v2.5.5 (including Doctrine v2.4.6) libraries. The measurements are a little bit synthetic, because every file was loaded (require_once) in a test script. It does not happen in real life application, classes are lazy loaded. The first two measurements are done on Nette Framework v2.2.3 and Symfony Framework v2.5.5 (including Doctrine v2.4.6) libraries. The measurements are a little bit synthetic, because every file was loaded (require_once) in a test script. It does not happen in real life application, classes are lazy loaded.
  
-The next two measurements are done on clean WordPress 4 installation. The first one is a homepage with one post request. The second one is a post editing page request.+The next two measurements are done on clean WordPress 4 installation. The first one is a request for a homepage with one post. The second one is a request for a post editing page.
  
 The last measurement is done on CLI application ApiGen 4.0.0-RC2. The API documentation is generated for mentioned Nette Framework. The last measurement is done on CLI application ApiGen 4.0.0-RC2. The API documentation is generated for mentioned Nette Framework.
  
-For a time performance measurement, every measurement step has been done 1000 times and averaged. Only the ApiGen run only 100 times due to long duration.+For a time performance measurement, every measurement step has been done 1000 times and averaged. Only the ApiGen run only 100 times due to long duration. The Time column is a percentage difference between patched and unpatched version.
  
 |                     ^ Classes ^ Interfaces ^ Traits ^ Functions ^  All ^ Files ^ Memory PHP7 ^ Memory RFC ^ Diff           ^^ Time | |                     ^ Classes ^ Interfaces ^ Traits ^ Functions ^  All ^ Files ^ Memory PHP7 ^ Memory RFC ^ Diff           ^^ Time |
 ^ Nette Framework         256 |         42 |      0 |         5 |  303 |   265 |      5612kB |     5711kB |   99kB |  1.8%  | 2.3% | ^ Nette Framework         256 |         42 |      0 |         5 |  303 |   265 |      5612kB |     5711kB |   99kB |  1.8%  | 2.3% |
 ^ Symfony Framework      2422 |        374 |      3 |        56 | 2855 |  2813 |     33744kB |    34796kB | 1053kB |  3.1%  | 1.4% | ^ Symfony Framework      2422 |        374 |      3 |        56 | 2855 |  2813 |     33744kB |    34796kB | 1053kB |  3.1%  | 1.4% |
-Wordpress Homepage  |      67 |          0 |      0 |      1647 | 1714 |    84 |      8900kB |     8964kB |   64kB |  0.7%  | 0.6% | +WordPress Homepage  |      67 |          0 |      0 |      1647 | 1714 |    84 |      8900kB |     8964kB |   64kB |  0.7%  | 0.6% | 
-Wordpress Edit Page |      78 |          0 |      0 |      2038 | 2116 |   109 |     11683kB |    11687kB |    4kB |  0.04% |  N/A |+WordPress Edit Page |      78 |          0 |      0 |      2038 | 2116 |   109 |     11683kB |    11687kB |    4kB |  0.04% |  N/A |
 ^ ApiGen              |     226 |         46 |      0 |        28 |  300 |   284 |     28430kB |    28898kB |  469kB |  1.6%  | 0.5% | ^ ApiGen              |     226 |         46 |      0 |        28 |  300 |   284 |     28430kB |    28898kB |  469kB |  1.6%  | 0.5% |
  
Line 135: Line 138:
  
 Patch does not contain opcache integration. Patch does not contain opcache integration.
 +
 +
 +===== Vote =====
 +Should be reflection in PHP 7 extended for a proposed ''getDefinedAliases()'' functionality?
 +
 +This is not a language change. 50% + 1 votes are needed to get 'accepted'.
 +
 +
 +
 +<doodle title="Access to aliases definition by reflection" auth="milo" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
 +The vote starts on 11/26/2014 and ends on 12/22/2014. 50% + 1 majority required.
  
rfc/aliases_by_reflection.1412976551.txt.gz · Last modified: 2017/09/22 13:28 (external edit)