Optimization: Use autoload for metaprogrammed controllers
hosh opened this issue · comments
Ho-Sheng Hsiao commented
Currently:
When each API container loads, all controllers are loaded in at once. This slows down specs.
Solution:
Use ActiveSupport#autoload or something similar to load controllers. May have to patch #autoload to accept a block. This may also fix non-eager-loaded controllers in development mode