Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Performance comparison of 3.3.9 vs 4.0 beta2 #24808

Closed
@javiereguiluz

Description

@javiereguiluz
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? no
Symfony version 4.0

We're so close to 4.0 release that I wanted to analyze its performance in comparison with 3.3. If my profiles are correct, then I'm disappointed because Symfony 4.0 is significantly slower, both at dev and prod.

Context

The analyzed application was Symfony Demo. I used master branch for Symfony 3.3.9 and symfony/demo#673 for Symfony 4.0 beta2.

I executed rm -fr var/cache/* and composer dump -o and restarted my web server before each benchmark (3.3.9 dev, 3.3.9 prod, 4.0 beta2 dev 4.0 beta2 prod).

The environment was PHP 7.1, Apache, SSD disk, OPCache enabled, Xdebug disabled, native PHP (no Docker or VM).

Results for PROD environment

(differences are from 3.3 to 4.0; positive values means worse performance)

Page URL Time difference Memory difference Comparison profile
Home / +17% +4% Details
Blog index /en/blog/ +8% +0% Details
Blog show /en/blog/posts/lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit +12% +1% Details
Backend index /en/admin/post/ +16% +0% Details
Backend edit /en/admin/post/1/edit +10% +0% Details

Results for DEV environment

(differences are from 3.3 to 4.0; positive values means worse performance)

Page URL Time difference Memory difference Comparison profile
Home / +24% +10% Details
Blog index /en/blog/ +15% +6% Details
Blog show /en/blog/posts/lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit +16% +7% Details
Backend index /en/admin/post/ +20% +8% Details
Backend edit /en/admin/post/1/edit +17% +6% Details

In the dev environment, there's an explosion of new function calls. Example:

function-calls

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions