MIDA-group / CytoBrowser

CytoBrowser, a JavaScript and Node.js driven environment for fast and accessible collaborative online visualization, assessment, and annotation of very large microscopy images.
GNU General Public License v3.0
16 stars 7 forks source link

Server stalls on Autosave of large annotation data #201

Closed joakimlindblad closed 2 years ago

joakimlindblad commented 2 years ago

For larger Annotation data, > 5000 markers

In extendHistory() if (diff.diffJson(JSON.parse(data), JSON.parse(oldData)).length === 1) seems like an extremely slow way to check if data has changed

Can we not just have a counter, or a checksum, or something?

joakimlindblad commented 2 years ago

And, also, diff.createPatch stalls; should/can we use Google's diff-match-patch instead? See: https://github.com/kpdecker/jsdiff/issues/239

joakimlindblad commented 2 years ago

See also https://github.com/justsml/json-diff-performance

joakimlindblad commented 2 years ago

Resolved by PR #217