During development (debugging) Container is being build on every request
- Marek Bartoš
- Nette Blogger | 1261
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:
application:
# Scan all directories with presenters
scanDirs:
- %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