I am using zend framework 1.11.11 in one of my application. I have written different _init methods in bootstrap to inilialize seesion, database connection, loading navigation, view helpers etc. It worked well initially when traffic to site is low. Afterwords i found that it is affecting performance. So I combined all things under one _init method.
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
protected function _initApp() {
$moduleLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
}
## DB initialization ####
## Zend_Registry::set ####
## SMTP initialization ####
}
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
protected function _initApp() {
$moduleLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
}
## DB initialization ####
## Zend_Registry::set ####
## SMTP initialization ####
}
0 comments:
Post a Comment