CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Is CiviCRM giving Drupal the bash?
Pages: [1]

Author Topic: Is CiviCRM giving Drupal the bash?  (Read 676 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Is CiviCRM giving Drupal the bash?
August 03, 2010, 09:52:20 pm
A site we look after has been crawling today with excessive menu rebuilds taking place and a really bad user experience. One thing that has also been going on today is that someone has been editing a lot of profiles. I've been looking to see what has been repeatedly causing the menu_rebuilds and from my reading of the code it looks like CiviCRM has not only been causing the rebuilds but has been flushing all caches all the time too! Can someone see if I'm right:

I believe this bit of code runs each time the profile is saved

Line 331

CRM_uf_form_group.php
Code: [Select]
        // update cms integration with registration / my account
        require_once 'CRM/Utils/System.php';
        CRM_Utils_System::updateCategories( );


While calls this function designed to bring any large site to it's knees and make it beg for mercy at the alter of CiviCRM

Code: [Select]
    static function updateCategories( ) {
        // copied this from profile.module. Seems a bit inefficient, but i dont know a better way
        // CRM-3600
        cache_clear_all();
        menu_rebuild();
    }


Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Is CiviCRM giving Drupal the bash?
August 04, 2010, 05:25:16 pm

this is because profiles can be included in user reg and more specifically my account pages

if optimizing this is important to you, please submit a patch that detects if the profile changed for my account / user reg (i.e. set on or off) and call updateCategories conditionally based on that

however seems like this is an edge case, IMO

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Is CiviCRM giving Drupal the bash?

This forum was archived on 2017-11-26.