An error occurred fetching the project authors.
  1. 01 Sep, 2017 2 commits
  2. 31 Aug, 2017 1 commit
    • Vincent Pelletier's avatar
      CatalogTool: Split getCategoryParameterDict in 2 · 79119142
      Vincent Pelletier authored
      One part working on {base_category_id: [document_value_set]}, and the other
      producing that structure out of a flat list of (base_category_id-prefixed)
      category relative urls.
      The former used to be included in the latter, but in some case caller
      already has the documents handy instead of only urls, in which case we can
      avoid a layer of document lookups.
      79119142
  3. 25 Aug, 2017 1 commit
  4. 27 Jul, 2017 4 commits
  5. 28 Jun, 2017 2 commits
  6. 18 May, 2017 1 commit
  7. 14 Apr, 2017 2 commits
    • Vincent Pelletier's avatar
      {ERP5,ZSQL}Catalog: Wrap all documents at once. · 8a278cbd
      Vincent Pelletier authored
      Allows reducing the number of user existence check queries from one per
      document to one per document batch, reducing database (currently, catalog)
      latency effect on indexation time.
      Also, avoid object -> id -> object dance for SQLCatalog instance while at
      it.
      Also, modernise syntax a bit, avoiding intermediate locals mostly.
      8a278cbd
    • Vincent Pelletier's avatar
      ERP5Catalog: Do not retrieve workflow catalog variables. · b62e851e
      Vincent Pelletier authored
      These are used nowhere in the code. In many workflows, these
      "catalog-available" variables are only configured so they appear as fields on
      worklist definitions. So it is understood as more of an informative setting
      having a local effect than a normative one having an effect on how
      indexation happens.
      So shave off a bit of useless time spent in indexation.
      Also, it should be mentionned that when profiling this code causes a big
      red-herring: this code is the first place where workflow history gets
      loaded (and presumably indexed document itself), which draws attention
      away from potentially more interesting areas.
      b62e851e
  8. 05 Apr, 2017 1 commit
  9. 03 Apr, 2017 1 commit
  10. 23 Dec, 2016 1 commit
  11. 20 Dec, 2016 3 commits
  12. 12 Dec, 2016 1 commit
  13. 24 May, 2016 3 commits
    • Vincent Pelletier's avatar
      CatalogTool: Assorted readability improvements. · da29e93c
      Vincent Pelletier authored
      Fix a misnamed local.
      Use iteritems.
      Move variables next to the loop they act on.
      Rewrite comments to better reflect the intention when it is not obvious in
      the implementation.
      Move a loop-invariant out of loop ((user, role) not in optimized_role_set).
      Do not use set.update on an iterable constructed just for the call, call
      set.add on each item.
      da29e93c
    • 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
    • Vincent Pelletier's avatar
      CatalogTool: Move getUserById call up one loop. · 6be1d3a1
      Vincent Pelletier authored
      Its parameter is a loop invariant, so avoid looking the same user up once
      per local role.
      6be1d3a1
  14. 12 Jan, 2016 1 commit
  15. 24 Sep, 2015 1 commit
  16. 23 Sep, 2015 2 commits
  17. 14 Aug, 2015 2 commits
  18. 10 Jul, 2015 1 commit
    • Vincent Pelletier's avatar
      EP5Type.Utils: Update SQL escaping rules. · 39c4873a
      Vincent Pelletier authored
      Sadly, we still implement our own escaping, as places escaping strings do
      not know which connector will be used (proper escaping is
      connector-dependent, because database-dependent).
      Move this method in ZSQLCatalog to factorise code.
      39c4873a
  19. 10 Jun, 2015 1 commit
  20. 13 May, 2015 2 commits
    • Julien Muchembled's avatar
      searchAndActivate: use a grouping method instead of callMethodOnObjectList · 3759047d
      Julien Muchembled authored
      The problem with callMethodOnObjectList is that when an object can't be
      processed, all other objects of the same group fail without any chance to
      be retried separately.
      
      Grouping is configurable with usual CMFActivity parameters in new 'group_kw'
      parameter, to avoid any conflict with catalog parameters (**kw).
      'packet_size' and 'activity_count' are still accepted for backward
      compatibility.
      3759047d
    • Julien Muchembled's avatar
      CMFActivity: new invokeGroup API · da234001
      Julien Muchembled authored
      The recent API change was not enough.
      A grouping method may need more information: in particular, the dummy grouping
      method must be fixed to change user.
      da234001
  21. 06 May, 2015 1 commit
    • Julien Muchembled's avatar
      CMFActivity: slightly delay non-executed grouped messages · c85a840f
      Julien Muchembled authored
      When grouped messages fail, ActivityTool must distinguish 3 groups,
      in order to reexecute them separately, as follows:
      - first, those that succeeded
      - then, those that were skipped
      - at last, failed ones
      
      Grouping methods are updated to handle partial failures, and stop doing
      anything when something goes wrong.
      
      Without this, we would have the following pathological cases.
      
      1. Let's suppose first that skipped messages are marked as succeeded.
      
      The problem is that each skipped message that will fail causes the reexecution
      of those that didn't fail.
      
      Exemple: A:ok B:ok C:err D:err E:err F:err
        1: A:ok, B:ok, C:err, D:skipped, E:skipped, F:skipped
        2: A:ok, B:ok, D:err, E:skipped, F:skipped
        3: A:ok, B:ok, E:err, F:skipped
        4: A:ok, B:ok, F:err
        5: A:ok, B:ok -> commit
      
      And worst, the first failed (C) may be processable again before 5, entering
      a failing loop if it is executed again in the same group as A & B.
      
      2. Another implementation is to mark all skipped as failed.
      
      Example:
        1: A:ok, B:ok, C:err, D:skipped, E:skipped, F:skipped
        2: A:ok, B:ok -> commit
        3: C:err, D:skipped, E:skipped, F:skipped
       >3: same as 3
      
      => D, E or F are never tried.
      c85a840f
  22. 31 Mar, 2015 1 commit
  23. 25 Mar, 2015 1 commit
  24. 29 Jan, 2015 1 commit
  25. 08 Nov, 2014 1 commit
    • Kazuhiko Shiozaki's avatar
      use fulltext search in title and description. · d47df833
      Kazuhiko Shiozaki authored
      * to quickly setup catalog_full_text table, you can use the following SQL.
      
        REPLACE INTO catalog_full_text SELECT uid, title, description FROM catalog;
      
      * non fulltext queries like '=abc', '>abc', '%abc%' are supported.
      
      * now erp5_full_text_mroonga_catalog is used for unit tests thus I recommend using it instead of erp5_full_text_myisam_catalog.
      
      * to migrate existing MyISAM full_text table into Mroonga, you can use the following SQL.
      
        ALTER TABLE full_text DROP KEY SearchableText,
          ENGINE = mroonga,
          ADD FULLTEXT KEY SearchableText (`SearchableText`) COMMENT 'parser "TokenBigramSplitSymbolAlpha"';
      
      * fulltext search score is no longer provided as (column_name) but now provided as (column_name)__score__.
      
      * (category)_title, like source_title, related keys are automatically generated. (category)_description keys as well.
      d47df833
  26. 16 Oct, 2014 1 commit
  27. 08 Sep, 2014 1 commit
    • Vincent Pelletier's avatar
      ERP5Catalog: Allow _searchAndActivate to use more from query result. · 0a9a8ef5
      Vincent Pelletier authored
      _searchAndActivate typically calls callMethodOnObjectList with paths as
      parameter. The result is that each listed document is loaded, which may
      not be required or desired.
      select_method_id avoids this loading by calling method_id once per
      packet_size with a list of values extracted from catalog result as (first)
      argument.
      0a9a8ef5