wasabee-project / Wasabee-IITC

ENL DrawTools and Op Management
Apache License 2.0
30 stars 21 forks source link

Blockers DB store #281

Closed le-jeu closed 3 years ago

le-jeu commented 3 years ago

Separate blockers from operation object This aims for common code for iitc and webUI. Blockers is IITC only.

Both blockers and related portals are store in the db with respect to the corresponding operation ID. This simplifies db cleanup.

This adds two db store:

blockers
opID
from
to
blockers_portals
opID
id
name
lat
lng
cloudkucooland commented 3 years ago

First read, looks good. Is there any discernible performance difference?

le-jeu commented 3 years ago

I don't have mean of measurement, but it may be a bit slower on auto-marked feature (current code) because of multiple of read write cycle to idb

cloudkucooland commented 3 years ago

I don't have mean of measurement, but it may be a bit slower on auto-marked feature (current code) because of multiple of read write cycle to idb

Auto-mark is so rarely called that it being even 200% slower wouldn't be an issue. I'm really primarily concerned with the map drawing/updating paths that are frequently called. We've done a good job of reducing the number of times the mapDrawing() is called, but that is still the important bottleneck path in the code.

le-jeu commented 3 years ago

no significant changes observed on mapdrawing. The blockers array is not used for map draw. It's only filled on crosslink check.

cloudkucooland commented 3 years ago

is this mergeable?

le-jeu commented 3 years ago

it looks like it's still mergeable and working note that because of the store, downgrade from dev to prod will need a database deletion (not possible from wasabee)

cloudkucooland commented 3 years ago

It seems reasonable to merge this. The manual indexeddb delete on downgrade is OK since those who run dev know where to get help. (or should)