What is 'preload' exactly in Application Configuration

This is the code from application figuration:


return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

	'name'=>'Yii Playground on Nicolas Machine',


	// preloading 'log' component

	'preload'=>array('log', 'dbManager', 'uiSettings', 'lc'),


	// autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

	),

...

My question is what is "preload" exactly. Does it mean yii read the class file(e.g.: dbManager.php) and store the content in server memory? How to determine if a component should preload?

Thanks!

Without preloading an application component, it will only be instantiatet on first access. This saves ressources, because in some requests a component isn’t touched at all, so it’s never created.

Usually the only component you want to preload is log. This is done to make sure, that the log router can do it’s job and output something on every request, even if the log component isn’t accessed at all.

Thanks a lot! Instantiate is a logic in OOP. I guess if it’s instantiated, then it must have went through the CPU and somewhere in the server memory.

Do I need to preload Core Application Components? such as db, request, session… see the core component lists

http://www.yiiframework.com/doc/guide/1.0/en/basics.application

I am sure I am going to use them in every web page.

No, they are loaded automatically.

does it also effect the position of Javascript files?

is there something like "postload" ?