Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 139
    • Merge requests 139
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !941

You need to sign in or sign up before continuing.
Merged
Created Sep 26, 2019 by Julien Muchembled@jmOwner

Optimize WorkflowHistoryList

  • Overview 26
  • Commits 0
  • Changes 0

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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: WorkflowHistoryList
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7