vigetlabs / microcosm

Flux with actions at center stage. Write optimistic updates, cancel requests, and track changes with ease.
http://code.viget.com/microcosm/
MIT License
487 stars 29 forks source link

Batch remove action snapshots #440

Closed nhunzaker closed 6 years ago

nhunzaker commented 6 years ago

What

This commit changes the way action snapshots are removed such that they are deleted in bulk. Additionally it moves the archive process to after the release process ends, preventing archiving from running multiple times between a release.

It also removes the BIRTH action, which was included to ensure that an action always had a parent. We don't need this. The only time an action will not have a parent is during START.

Why

Mostly just a performance optimization that was uncovered with #438


Fixes #440

codecov-io commented 6 years ago

Codecov Report

Merging #440 into no-append will increase coverage by 2.11%. The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##           no-append     #440      +/-   ##
=============================================
+ Coverage      77.23%   79.35%   +2.11%     
=============================================
  Files             44       44              
  Lines           1362     1366       +4     
  Branches         251      253       +2     
=============================================
+ Hits            1052     1084      +32     
+ Misses           257      231      -26     
+ Partials          53       51       -2
Impacted Files Coverage Δ
packages/microcosm/src/lifecycle.js 100% <ø> (ø) :arrow_up:
packages/microcosm/src/history.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/microcosm.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/utils.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/action.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/addons/action-queue.js 0% <0%> (-100%) :arrow_down:
packages/microcosm/src/addons/action-button.js 96.87% <0%> (-3.13%) :arrow_down:
packages/microcosm/src/addons/action-form.js 97.61% <0%> (+97.61%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3bdd440...2baa654. Read the comment docs.

nhunzaker commented 6 years ago

@efatsi I'm going to close this one out. I have some changes to history that invalidate this in some upcoming work. Will post soon :)