iammatis / diploy

0 stars 0 forks source link

Commit workflow #22

Open iammatis opened 5 years ago

iammatis commented 5 years ago

Current implementation requires several O(n) loops:

  1. Writing entities to a main file - O(n)
  2. Adding meta objects to Map - O(n)
  3. Writing meta objects to file - O(m)

Possible improvement could be achieved with one bigger loop, iterating through entities and doing all the operations 1. and 2. while doing so in O(n) time and then saving meta objects to file in O(m) time. This might require implementation of undo/redo logs #6 that would be made beforehand.

All these operations need to be done for both toBeRemoved and toBePersisted, this might be improved too by merging these two maps.