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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:13:19+00:00 2026-05-27T18:13:19+00:00

I’m working on a project with Zend Framework 1.11, Doctrine 2, some Symfony 2

  • 0

I’m working on a project with Zend Framework 1.11, Doctrine 2, some Symfony 2 componenents and others tools & libraries.

I’m trying to optimize performance using Xdebug & Webgrind.

I’ve already found some bottlenecks like parsing Ini config, etc.. and cached that.

Now, I just realize that the autoloading is the most costly part of my application:

    Opl\Autoloader\ApcLoader->loadClass                    274   31.36   43.86
    Zend_Loader_PluginLoader->load                         150    4.80   12.29
    Zend_Loader_Autoloader->getClassAutoloaders            278    1.42    1.91
    Zend_Controller_Router_Route_Regex->_getMappedValues   291    1.29    1.35
    Doctrine\ORM\UnitOfWork->createEntity                   85    1.24    3.18

As you can see I’m not using the default Zend_Loader_Autoloader, I’m using Opl which is, as far I know, quicker than it, I’m using the classMapLoader with an APC cache but it still a bit slows compared to rest of the application.

How could I optimize that?

I’ve around 250 classes loaded, and it looks that only ~40 are slow, others show 0,00 as “Total call cost” but others are increasing from 0,08 to 0,57 on the require call.

By the way, since using the Opl autoloader, it looks that on my production environnement APC only opcode cache the file which are “manually required” not the ones which are called by the autoloader.

  • 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-27T18:13:20+00:00Added an answer on May 27, 2026 at 6:13 pm

    If refactoring your code is not an option (drop Zend Framework, Drop Doctrine, Drop …) I would first optimize in buying better hardware. That will automatically optimize your code, because the context of the code is just shifted (this is not exactly optimizing the code, as the code won’t change).

    If that is not an option consider to create yourself a build system that can pre-process your codebase and create a non-development version of it to cut the loading process. This requires the analysis which files are needed always and you compile them all into a loader-optimized format which could be single file and/or static class loader maps.

    However it’s known that Zend needs to load a lot into memory always. Even using a PHP cache like APC might already bring you something (consider to pre-compile with the earlier noted build script and optimize the parts highlighted by your metrics).

    If your application structure allows it, there is another possibility, too: Keep your whole application in memory between requests. That can be done with a PHP webserver. That done, the code only needs to get loaded once the server starts and will never needed to load again. This only works with your own application if it supports multiple requests. A good encapsulated application especially with the request logic can be adopted quite easily for that. An existing solution is appserver-in-php. You will be amazed how much the speed increases compared to the benefits you already gained from APC.

    Maybe this was helpful. Any additional, more concrete suggestions are hard to make as it’s not possible to see your code in action nor to have detailed metrics on it. You’ve just passed a fragment on what’s going behind the scenes so it’s hard to tell you more concretely.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.