• Vincent Pelletier's avatar
    CatalogTool: Avoid computing user's roles when just testing existence. · ed0c06f9
    Vincent Pelletier authored
    Global role computation is very expensive, don't do it when all we are
    interested in is user existence.
    Also, list all users having local roles in one call to reduce the effect
    of per-call overhead.
    This should improve indexation speed by a large fraction: pprofile
    statistical run on and activity node busy reindexing objects shows:
    - 57% of time spend generating (13%) and executing (44%) SQL
    - 42% of time spent preparing object for indexation:
      - 29% in _getSecurityParameterList, all in getUserById
      - 12% in getCatalogVariablesFor (workflow variables to index)
    So an improvement of close to 30% is expected.
    ed0c06f9
CatalogTool.py 45 KB