In hook_init() the module calls the below function which does a variable_set for the blazy library installation status.
function lazy_is_library_installed() {
$blazy = libraries_detect('blazy');
variable_set('lazy_library_installed', $blazy['installed']);
return $blazy['installed'];
}
variable_set writes data into the 'variable' table, and clears the entire variable cache on every page request.
At the very least, there should be a check to see if the current value of the variable matches the blazy library status, avoiding the need for a variable update.
Comments
Comment #2
gianani commentedThe below patch only updates the variable if its value has changed.
Comment #3
nikolas.tatianenko commentedComment #4
IreneV commentedReviewed and tested - works OK!
Comment #5
ram4nd commentedComment #7
osmanThanks for the patch.