I used this great module before several times before and had to abandon it due to performance issues. tried it again today and still it slows down page loads considerably.
Is there anything that can be done to improve it performance?

Comments

mikeytown2’s picture

I've had reports of this but I can never repo it. If I add in some functionally to tie into the devel module and have it output how long certain advagg operations take, would you be willing to use it to help find the slow points in your case?

Will also mention that unless you're using the aggressive cache setting, it will be slightly slower than core and all bets are off if your using the development cache setting (this checks for changes to css/js files on every page load). The advagg cache setting can be found on admin/config/development/performance/advagg.

sinasalek’s picture

Yes i'll help.
I didn't use aggressive caching since it had been mentioned that it may break things. If the only problem is when a js/css file is modified it might not update it in time, you may want to update the description because it might be misleading
No devel module was installed on the site i tested advagg

mikeytown2’s picture

Does it list the modules that might be incompatible at the bottom of the description; if none are found odds are things will work just fine. If a module uses hook_css_alter or hook_js_alter to alter things based off of some kind of context besides the url then the aggressive cache might not work correctly; hook_css/js_alter do not get ran again with the aggressive cache turned on (they do get ran and then that result is cached). If that is the case, to get it to work correctly you would need to add in that context to advagg so it knows that the css/js will be different based on that new bit of contextual information.

Example being an alter that adds a CSS file if that user has the role of administrator. The hook to use is hook_advagg_current_hooks_hash_array_alter().

/**
 * Implements hook_advagg_current_hooks_hash_array_alter().
 */
function advagg_mod_advagg_current_hooks_hash_array_alter(&$aggregate_settings) {
  // Skip if uid is empty/zero.
  if (empty($GLOBALS['user']->uid)) {
    return;
  }

  // Get user roles if not set.
  $account = $GLOBALS['user'];
  if (empty($GLOBALS['user']->roles)) {
    $account = user_load($GLOBALS['user']->uid);
  }

  // Create a different aggregate for users with the admin role.
  if (in_array('administrator', $GLOBALS['user']->roles)) {
    $aggregate_settings['variables']['user_has_admin_role'] = TRUE;
  }
}

There is no good way of making this automatically figure out if the hook's usage is safe to use so I created a function that drives the warning on the admin page. You can alter the whitelist for it by implementing hook_advagg_agressive_cache_conflicts_alter(&$whitelist).

Anyway to get back to the original issue I'll work on creating some php wall time integration if the devel module is installed.

mikeytown2’s picture

Version: 7.x-2.7 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

The latest dev version has had a lot of performance tweaks; please re-open if you are still having issues when using the latest dev.

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Fixed

Going to mark this as fixed due to lack of feedback.

mikeytown2’s picture

Status: Fixed » Closed (duplicate)

Duplicate is better I think
#2418935: Use utf8_bin instead of utf8_unicode_ci for the varchar database columns
Be sure to create a new issue if you encounter more issues.