Skip to content
  • Eloy Lafuente (stronk7)'s avatar
    6eb9e038
    MDL-50176 repository_youtube: delay loading google service stuff · 6eb9e038
    Eloy Lafuente (stronk7) authored
    Loading Google client services is a little monster, eating around
    2MB (opcache enabled) of memory. As far as we instantiate the
    repository instances really early, no matter they are not used
    later (editor, file picker, admin...).. we are delaying the
    load of the service until we know we are going to use it.
    
    Surely applying this very same (sort of lazy load) techinque
    to other repositories could lead to a nice memory reduction
    in lots of pages.
    
    MDL-50176 repository_youtube: also delay the inclusion of client.
    
    While memory was fixed with previous commit, still some extra included
    files where being reported, so go crazy and move all the stuff to
    the new init delayed method.
    6eb9e038
    MDL-50176 repository_youtube: delay loading google service stuff
    Eloy Lafuente (stronk7) authored
    Loading Google client services is a little monster, eating around
    2MB (opcache enabled) of memory. As far as we instantiate the
    repository instances really early, no matter they are not used
    later (editor, file picker, admin...).. we are delaying the
    load of the service until we know we are going to use it.
    
    Surely applying this very same (sort of lazy load) techinque
    to other repositories could lead to a nice memory reduction
    in lots of pages.
    
    MDL-50176 repository_youtube: also delay the inclusion of client.
    
    While memory was fixed with previous commit, still some extra included
    files where being reported, so go crazy and move all the stuff to
    the new init delayed method.
Loading