petterik / lajter

MIT License
3 stars 0 forks source link

Garbage collect layers in production #39

Open petterik opened 6 years ago

petterik commented 6 years ago

:layer.merge/value and :layer.snapshot/db can sometimes be garbage collected. It's not a big deal during development, but it reduces the memory foot print which is nice for production.

petterik commented 6 years ago

:layer.merge/value can be removed once it has been merged into the app state and there's a snapshot ahead of the layer that "won't be removed because of re-applying layers".

Should probably mark snapshots that won't be removed/re-applied.

:layer.snapshot/db can be removed once there's a snapshot layer ahead of it that won't be removed.