During development (debugging) Container is being build on every request

Bronze Partner | 18

I understand this is feature not a bug.
But it takes +/- 2 sec to build it in my case.

It would be nice, if this feature would be optional, so I could disable building container on every request even during development (debugging).

Marek Bartoš
Nette Blogger | 1167

If it's rebuilding every single request, even if you didn't change anything then it's a bug. It should rebuilt with debug mode enabled only when monitored files change.

Usually this problem comes when there is something wrong with registering presenters as services. Directory /temp/cache/nette.application/touch should exist if it's that problem. I personally just register all presenters as services manually and have an exception thrown when an unknown presenter is requested, but you may also verify following options are properly configured:

	# Scan all directories with presenters
		- %appDir%/path/to/presenters
	# Scan composer classmap
	# Either packages have to use classmap autoloading (not PSR-4) or you have to generate classmap for all classes via composer install --classmap-authoritative or composer dump or composer update with the same option
	scanComposer: true