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 7968577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:05:57+00:00 2026-06-04T07:05:57+00:00

I am working on an application (Symfony 1.4 / Doctrine) that has some pages

  • 0

I am working on an application (Symfony 1.4 / Doctrine) that has some pages that are pretty heavy to load. One of these pages contains a very complex form with a lot of relations (embedded forms). The page does something like this: get all objects, create the forms (with the objects), render the forms.

This is resulting in loadtimes of approximately 1.5 seconds per page. MySQL doesn’t seem to be the bottleneck, doing the queries takes about 0.01 seconds. However, hydrating the results takes a lot more time: about 0.3 seconds. Creating and embedding all the subforms also takes a lot of time (0.5s). Rest of the time spend in regular Symfony/Doctrine methods. All of these times were found with Symfony timers and/or xdebug.

I hoped that I could speed up the process on my production server by using APC for opcode caching. So I installed APC, did some configurations (cache size = 400MB; max file size = 20MB, just to be sure), and finally benchmarked the application.

Without APC:

$ ab -n 100
Requests per second:    0.72 [#/sec] (mean)
Time per request:       1392.142 [ms] (mean)
Time per request:       1392.142 [ms] (mean, across all concurrent requests)
Transfer rate:          130.62 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4    5   3.6      4      32
Processing:  1301 1387 258.0   1338    3549
Waiting:     1229 1315 258.2   1267    3475
Total:       1305 1392 258.0   1342    3553

With APC:

$ ab -n 100
Requests per second:    0.86 [#/sec] (mean)
Time per request:       1160.666 [ms] (mean)
Time per request:       1160.666 [ms] (mean, across all concurrent requests)
Transfer rate:          156.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4    4   0.7      4       9
Processing:  1071 1156 164.1   1121    2337
Waiting:     1024 1104 164.3   1065    2286
Total:       1075 1161 164.1   1125    2341

There is a bit of improvement, but the results are quite disappointing. To be sure that APC was working well, I also benchmarked a Drupal website that is running on the same server. This almost doubled the requests/second for the Drupal website (from 4 pages/sec to 8 pages/sec)! So clearly APC is working correctly.

Does anybody have a clue what could be the cause of this lack of speedup? Has anyone done some benchmarks on a Symfony application with/without APC? I can find some claims on the internet of applications that doubles their requests/seconds, but all without benchmarks.

  • 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-06-04T07:05:58+00:00Added an answer on June 4, 2026 at 7:05 am

    Opcode caching only speeds up the loading of the original classes. When much of the time the code loops through a database result, creating complex objects, APC alone won’t help.

    Doctrine has support for caching Queries and results, however, caching in APC needs to be configured. See this URL: http://readthedocs.org/docs/doctrine/en/latest/en/manual/caching.html

    Maybe you can use apc_add to cache the forms after they are created. This has the risk of presenting stale data to the user, but maybe it’s worth it.

    To get more information why it’s taking so long, you should look into profiling with XDebug.

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

Sidebar

Related Questions

I am working on some kind of notifications module in a Symfony application. I
I'm working on a project with Zend Framework 1.11, Doctrine 2, some Symfony 2
I am working on splitting out an existing, working application that I currently have
Now that I have a read-only application working, I am working on the insert
I'm working on a solution that has two applications 1) Wordpress based CRM (frontend)
What's the best way to make small schema updates to your symfony/doctrine application? My
I'm working on an in-house project management web based application that needs to support
I'm working on a Symfony2 application, that I use to manage my monthly budget.
Basically I have a working application that sends an SMS after receiving an SMS.
I have a working application that establishes an SSL connection to a server. The

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.