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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:41:42+00:00 2026-05-27T17:41:42+00:00

I am trying to optimize zend for performance. I used as much cache as

  • 0

I am trying to optimize zend for performance.
I used as much cache as possible and got to the code of this page
where do i have to write it ? i tried putting it in bootstrap __initAutoload() but the profiler shows no change whatsover

$classFileIncCache = APPLICATION_PATH . '/../data/pluginLoaderCache.php';
if (file_exists($classFileIncCache)) {
    include_once $classFileIncCache;
}
Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);

Can someone explain how to use it pluginloader and if it has a performance increase?

here is part of my bootstrap

protected function _initSessionAfterDb()
    {
        //http://stackoverflow.com/questions/1100562/zend-error-via-my-ini-file
        $this->bootstrap('db');
        $this->bootstrap('session');
    }

protected function _initSession()
    {

         $this->bootstrap('cache');//http://stackoverflow.com/questions/5271018/zend-how-to-enable-cachemetadata-on-session-table
        //NOTE: this config is also passed to Zend_Db_Table so anything specific
        //to the table can be put in the config as well
        $config = array(
            'name'              => 'session', //table name as per Zend_Db_Table
            'primary'           => array(
                'session_id',   //the sessionID given by PHP
                'save_path',    //session.save_path
                'name',         //session name
                //'cols' => array('session_id', 'save_path', 'name', 'modified', 'lifetime', 'session_data')
            ),
            'primaryAssignment' => array(
                //you must tell the save handler which columns you
                //are using as the primary key. ORDER IS IMPORTANT
                'sessionId', //first column of the primary key is of the sessionID
                'sessionSavePath', //second column of the primary key is the save path
                'sessionName', //third column of the primary key is the session name
            ),
            'modifiedColumn'    => 'modified',     //time the session should expire
            'dataColumn'        => 'session_data', //serialized data
            'lifetimeColumn'    => 'lifetime',     //end of life for a specific record
            'user_id' => 'user_id'
        );
        //Tell Zend_Session to use your Save Handler
        $savehandler = new Zend_Session_SaveHandler_DbTable($config);


        //http://framework.zend.com/wiki/display/ZFPROP/Zend_Session_SaveHandler_DbTable
        //cookie persist for 30 min
        $config = Zend_Registry::get('config');


        $seconds = $config->session->seconds_life;

        //make the session persist for 30 min
        $savehandler->setLifetime($seconds)
            ->setOverrideLifetime(true);

        Zend_Session::setSaveHandler($savehandler);

        Zend_Session::start();
    }
  • 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-27T17:41:43+00:00Added an answer on May 27, 2026 at 5:41 pm

    I think you are not starting on the good foot, early optimization is the root of all evil. First I think you should investigate which part of your application is the slowest and try to fix it, xdebug should be able to help to get some performance data.

    The plugin loader cache would increase the performance but not by a great deal, the framework search in the filesystem the plugins you are using. Enabling the cache would skip the searching process but I doubt it would make your application 50% faster all suddendly.

    Also to answer where you should write it, like you mentioned the bootstrap is probably the best place.

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

Sidebar

Related Questions

I am trying to optimize my code as much as possible. I use a
I'm trying to optimize query performance and have had to resort to using optimizer
I have been trying to optimize some code which handles raw pixel data. Currently
I am trying to optimize my code to make run as fast as possible
I'm trying to optimize code that I have. In order to do that, I
I'm trying to optimize the following. The code bellow does this : If a
I've been trying to optimize some extremely performance-critical code (a quick sort algorithm that's
I have a application built on Zend Framework I am trying to optimize. I
I am trying to optimize a small, highly used function which uses the high
I`m having trouble trying to optimize this query with OVER (PARTITION BY ...) because

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.