Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6690211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:36:38+00:00 2026-05-26T05:36:38+00:00

I have a question about Symfony2 performance. I have been developing with Symfony2 under

  • 0

I have a question about Symfony2 performance.

I have been developing with Symfony2 under Ubuntu 11.04 for a few weeks now, Apache 2.2.17, PHP 5.3.5, APC 3.1.9, no xDebug

On the dev environment, the time given on the Symfony2 toolbar was never above 70 ms.

Today, I’ve tried to install my app on a Windows 7 environment : Wampserver 2.2, PHP 5.3.8, Apache 2.2.21, APC 3.1.7, no xDebug

The computer on the windows environment is much better than the one on ubuntu (SSD, Quad core, etc).

And when I run the application on the dev environment, the toolbar indicates always a minimum of 300 ms.

So, do you know how it is possible ?

Thanks !

EDIT : found a link about the subject : http://fossplanet.com/f6/%5Bsymfony-users%5D-symfony2-slow-windows-xp-116465/

I noticed the problem with the file_exists function too (using webgrind).

So, any ideas ?

Maybe the subject has already been discussed, but I was surprised not to find anything related.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:36:39+00:00Added an answer on May 26, 2026 at 5:36 am

    TL;DR; Set realpath_cache_size to a value > 1000

    Edit 2: Problem solved in this PR: Try to set PHP.ini’s realpath_cache_size to a value > 1000
    A symfony requirement was recently added fixing this issue: https://github.com/sensiolabs/SensioDistributionBundle/commit/cf0179711b24d84d4a29d71a4010540f4c990bd8

    Edit: I just saw this answer: https://stackoverflow.com/a/17914570/980547
    And it decreased page generation time by 4 on windows when I set realpath_cache_size=4096k in my php.ini (!)

    Old answer:

    So, I did a comparison between both with webgrind:

    On windows (fast computer), called app_dev.php:

    Web toolbar

    So you can see that the web toolbar shows a 764ms time generation (increased because of xDebug and profiling, but still relevant).
    Webgrind shows:

    • 651 calls to file_exists() for a time of 232ms (which is a lot!)
    • 603 calls to filemtime() (211ms)
    • 230 calls to UniversalClassLoader->loadClass() (119ms)
    • 230 calls to UniversalClassLoader->findFile() (38ms)

    On linux (slow computer), app_dev.php:

    Web toolbar

    298ms of total generation time (which is more than twice less than on windows).

    • 237 calls to UniversalClassLoader->findFile() (36ms => 4 times less)
    • 237 calls to UniversalClassLoader->loadClass() (20ms => 2 times less)
    • 623 calls to file_exists() (4ms only !!!)
    • 605 callsd to filemtime() (4ms only !!!)

    The problem seems to be file_exists() and filemtime(), which are much slower on windows than on Linux. On windows, PHP is looking for files with file_exists, filemtime, loadClass or findFile for 60% of the time. Is that a known problem ?

    Edit : so the problem is only for the dev environment, in production no file_exists are done since everything is cached.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Symfony2 and I have maybe a simple question about encoding my
I have question about integrate Open office with PHP. I want make mail merge
I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and
I have question about normalization. Suppose I have an applications dealing with songs. First
I have a question about using streams in .NET to load files from disk.
I have a question about best practices regarding how one should approach storing complex
I have a question about locking. This doesn't have to be only about record
I have a question about how to deploy WPF application into a PC without
I have a question about using os.execvp in Python. I have the following bit
I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.