1. 06 Sep, 2018 7 commits
    • Vincent Pelletier's avatar
      Revert "ZMySQLDA: Optimise date & datetime parsing in results." · 8c2e8567
      Vincent Pelletier authored
      For some reason, unit tests all broke while testing this revision. The
      relation between both is not clear to me (this code has worked for me).
      In doubt, I revert it for now.
      This reverts commit 0057272c.
      8c2e8567
    • Vincent Pelletier's avatar
      erp5_hal_json_style: Do not call getRelativeUrl to just traverse it one call later · f8ec52ae
      Vincent Pelletier authored
      getRelativeUrl and restrictedTraverse are expensive operations. Do not
      involve them pointlessly.
      Also, boolean evaluation of lists is a thing.
      f8ec52ae
    • Vincent Pelletier's avatar
      ZMySQLDA: Optimise date & datetime parsing in results. · 12ba12a8
      Vincent Pelletier authored
      A pprofile run shows DateTime_or_None costing 3ms per value (including all
      callees).
      While this may seem low, it is common to receive hundreds of such values
      in single query results (ex: web mode document & webpage lookups),
      so the total time spent parting dates per query can become significantly
      larger than the time to execute the query itself.
      In the case of this measure setup, 504 dates were processed for a total of
      1.5 seconds.
      DateTime is slow to parse strings because it cannot rely on a pre-known
      format. With MySQL/MariaDB, the format is know for those column types, so
      implement specific parsing to get better performance.
      On the same setup, pprofile run shows a parsing time of 72µs per value in
      DATETIME_to_DateTime_or_None, or 39ms total.
      DATE_to_DateTime_or_None should not deviate significantly from this.
      12ba12a8
    • Jérome Perrin's avatar
      CMFCategory: do not store self membership of categories · 389632fd
      Jérome Perrin authored
      CategoryTool.getCategoryList dynamically returns categories as member of
      themselves, but there were cases (for example after changing id) where
      the membership happens to be saved in `categories` attribute and later
      caused problems after clones or renames.
      To prevent these problems, CategoryTool._setCategoryList detects the
      membership to self and does not save it as part of .categories
      
      Remove no longer needed after clone script.
      
      Remove tests which no longer makes sense now that setCategoryList does
      not add membership to self.
      389632fd
    • Jérome Perrin's avatar
      testCMFCategory: update comment about categories membership to self · 6fa12fb1
      Jérome Perrin authored
      Add a warning about the doubt regarding the example in comment, to me
      this does not depend on category being member of self.
      
      One reason for the membership to self - in my understanding - is to make
      inventory API work the same with movement to meta node categories or
      movement to nodes member of this category when using
      getInventory(node_category=(the meta node category))
      
      Also remove comment about what's said to be a "mistake" ( the svn url should
      be equivalent to git commit eedb2b29 )
      because this was never reverted and does not seem to be a mistake, the
      purpose of the change is to prevent having categories member of
      themselves twice.
      6fa12fb1
    • Jérome Perrin's avatar
      testCMFCategory: test category membership to itself after move · 8f93e500
      Jérome Perrin authored
      This was partially convered by test_13b_RenameCategoryUsingCutAndPaste
      and test_13_RenameCategory but not for the edge case where category
      membership to self is set in .categories
      8f93e500
    • Jérome Perrin's avatar
      testCMFCategory: test/document a bit more cases of update of related categories · da1b9eb7
      Jérome Perrin authored
      Add a few assertions and comment to make it clearer what is the expected
      behavior on related documents and on the category itself when categories
      are renamed or moved.
      da1b9eb7
  2. 27 Aug, 2018 2 commits
  3. 24 Aug, 2018 3 commits
  4. 23 Aug, 2018 14 commits
  5. 22 Aug, 2018 1 commit
    • Xiaowu Zhang's avatar
      erp5_web_renderjs_ui_test: wait for page loaded · 8aa74de6
      Xiaowu Zhang authored
      this commit should fix random plus button not present issue when open sort editor
      the reason is sort editor is opened before launcher call editor_panel.close()
      so wait for page loaded before open sort editor
      8aa74de6
  6. 21 Aug, 2018 6 commits
  7. 20 Aug, 2018 2 commits
  8. 17 Aug, 2018 5 commits