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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:57:11+00:00 2026-06-03T20:57:11+00:00

I’m currently building a web application using Zend framework 1.11.11 and Doctrine 2.2. I

  • 0

I’m currently building a web application using Zend framework 1.11.11 and Doctrine 2.2. I searched a lot for the best ways and hacks to optimize the frameworks used.

During my search for Zend framework optimization I stumbled upon this post:
Optimising the Zend Framework

What was interesting about it is that it mentioned few optimization techniques that emerged from the usage of the framework itself and wasn’t covered in the manual itself such as:

  • disable viewRenderer and take care of view rendering yourself.

Now I’m looking for similar techniques that could be applied to Doctrine 2 other than the ones mentioned here in the manual.

Note

I know many will mention profiling the queries, caching and finding the bottle neck of the app, but that’s not um looking for 🙂 I am looking for practical enhancements discovered during Doctrine 2 usage.

Thanks 😉

  • 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-03T20:57:12+00:00Added an answer on June 3, 2026 at 8:57 pm

    Well, optimizing and hacking Doctrine 2 will not be an easy task. I can only advise you to follow the official “best practice”:

    • Use Query Cache
    • Use Metadata Cache
    • Pre-generate proxies
    • Avoid listeners (or merge them by event type (flush, update), it will avoid the lookup time and the loop for subscribed events)
    • Use lazy-loading whenever it is possible
    • Make sure your relationships or inheritance are not messed up

    (Note that I didn’t mentioned Result cache which should not be a way to optimize an application)

    From my use, the most important part I had to optimize was not Doctrine itself (while there are optimizations to do to the core) but the generated Query, as always, I EXPLAINed the queries and optimized indexes.

    Doctrine 2 can be high memory consuming so loading a lot of entities at once may slow down your application, you may find it useful to known about clear(), detach(), iterate() methods.

    Despite the fact Doctrine 2 can sometimes be slow, I mostly noticed that I was able to optimize application somewhere else, within the Zend Framework or PHP themselves.

    Let’s say, Doctrine 2 takes 100ms where Zend Framework takes 300ms for a total of 450ms (I/O stuffs, PHP internal functions, etc..)

    If you can divide easily by two the time taken by Zend Framework, optimizing Doctrine 2 to gain like 10% will not increase notably the speed of your application. Think about it twice.

    Here are a few tips:

    • Create your own view instead of using View Helpers (avoid the helper lookup)
    • Cache your Zend_Config object (really heavy load)
    • Avoid Regex routes whenever possible (ZF routes are a big bottleneck)
    • Use a ClassMap autoloader instead of the native Zend_Loader_Autoloader

    There are tons of optimization to do, some have a real impact while others don’t.

    Make sure to find them by profiling your application, an easy and cross-platform is to use webgrind.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
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 am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am currently running into a problem where an element is coming back from

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.