Skip to content
  • John Hawthorn's avatar
    758ad13c
    Avoid creating helper modules until modified · 758ad13c
    John Hawthorn authored
    In applications which use :all helpers (the default), most controllers
    won't be making modifications to their _helpers module.
    
    In CRuby this created many ICLASS objects which could cause a large
    increase in memory usage in applications with many controllers and
    helpers.
    
    To avoid creating unnecessary modules this PR builds modules only when a
    modification is being made: ethier by calling `helper`, `helper_method`,
    or through having a default helper (one matching the controller's name)
    included onto it.
    758ad13c
    Avoid creating helper modules until modified
    John Hawthorn authored
    In applications which use :all helpers (the default), most controllers
    won't be making modifications to their _helpers module.
    
    In CRuby this created many ICLASS objects which could cause a large
    increase in memory usage in applications with many controllers and
    helpers.
    
    To avoid creating unnecessary modules this PR builds modules only when a
    modification is being made: ethier by calling `helper`, `helper_method`,
    or through having a default helper (one matching the controller's name)
    included onto it.
Loading