Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using a PHP framework affect performance? [closed]

If I used Code Igniter or the Cake Framework, will it affect the performance of my application?

like image 955
getaway Avatar asked Aug 28 '10 12:08

getaway


2 Answers

If you define performance as speed of execution, then the answer is

  • Yes, it will degrade performance - always.

Frameworks offer abstractions over PHP's native functions. Whenever you put an abstraction onto something, you incur the penalty of loading the abstraction and invoking it's functions. Frameworks are usually general abstractions, that cater to a lot of UseCases. Solving a specific UseCase in your application can likely be solved with less abstraction.

But with frameworks you gain better modularization, faster development times (if you know the framework), better maintainability and (hopefully) tested code, which is usually worth it. That's not to say, always use a framework, but always consider the tradeoff - then decide.

As for benchmarks, well, have a look at

  • PHP Framework Benchmarks: Entertaining But Ultimately Useless
like image 169
Gordon Avatar answered Sep 28 '22 12:09

Gordon


Look here, PHP framework comparison benchmarks.

But, if you need very fast performance, I would advise Yii because of its awesome performance.:

like image 39
shamittomar Avatar answered Sep 28 '22 12:09

shamittomar