PHP Classes

Make Efficiency a Priority

Recommend this page to a friend!

      PHP Classes blog  >  How PHP 7.1 May Elimi...  >  All threads  >  Make Efficiency a Priority  >  (Un) Subscribe thread alerts  
Subject:Make Efficiency a Priority
Summary:PHP Frameworks must be compelled to pursue efficiency as a prior
Messages:2
Author:Sandro Bilbeisi
Date:2017-01-09 17:56:38
Update:2017-01-10 03:14:51
 

  1. Make Efficiency a Priority   Reply   Report abuse  
Picture of Sandro Bilbeisi Sandro Bilbeisi - 2017-01-09 21:50:02
PHP Framework authors must be compelled to pursue efficiency as a priority.
To this end, a variety of strategies and practices must be encouraged.
- use APCu pervasively , don't waste queries / computations
- discourage sprawling use of Autoload when it's not called for ( why load and parse hundreds of unused files )
- encourage PHP Core team to embrace snapshot compilations , even support loading the deliverables from PHAR files

  2. Re: Make Efficiency a Priority   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2017-01-10 03:14:51 - In reply to message 1 from Sandro Bilbeisi
Yes, that is true. There are many techniques that can be implemented, many of them at the reach of developers regardless of the PHP version they use.

Good auto-loaders these day just ready scripts that contain array that map classes to to class files eventually as a result of pre-processing class files, so no file system scanning happens at the run time.

Snapshot compilations is a non-trivial feature that can be implemented in future PHP versions. Lets see when that happens.