Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !941

Optimize WorkflowHistoryList

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Julien Muchembled requested to merge WorkflowHistoryList into master Sep 26, 2019
  • Overview 26
  • Commits 0
  • Pipelines 0
  • Changes -

This is done by inheriting most of the code of ConflictFreeLog, i.e. using a doubly-linked list:

  • for fast iteration of the first elements, and in particular immediate access to the first element (used for creation date);
  • that keeps track of the history length;
  • that implement fast reverse iteration (although it could have been done without changing the data structure).

The size of buckets is not fixed anymore to 16 items: like ConflictFreeLog, WorkflowHistoryList is also a good candidate to look at the estimated serialized size of the bucket in order to decide if elements should be added to a new one or not. Then developers won't have to care about using Pdata or not.

The size is bigger than the ConflictFreeLog default, because workflow items look a lot alike and adding a few more is cheap when the ZODB compresses.

No more optimized __getstate__ (except for workflow histories that have not been migrated) so BT export is a bit more verbose.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: WorkflowHistoryList
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7