cvisionai / tator

Video analytics web platform
https://tator.io
GNU Affero General Public License v3.0
107 stars 34 forks source link

Version selection requests are inefficient and cause multiple UI updates #1770

Closed jrtcppv closed 3 months ago

jrtcppv commented 3 months ago

Currently a version change results in data being retrieved from the server regardless of whether it has already been retrieved. One request is sent per data type. When a response is received, the annotation data emits a freshData signal, potentially resulting in multiple intermingled UI updates, even for different versions if version changes are rapid and/or the requests are slow. The user is also able to continue interacting with the UI while the version change is active.

Thanks to @sbatchelder for bringing this to our attention.

jrtcppv commented 3 months ago

Because version specific data may change when one version is edited, this may require a cache invalidation scheme and be somewhat complicated. The UI lockout will be implemented as a hotfix and the caching scheme will be part of 1.4. Opened separate issue #1771 to track the UI lockout.

jrtcppv commented 3 months ago

It is possible that rather than using client side caching, we could leave the client unchanged and use cache control/ETag headers, relying on the browser to use disk cache instead of tracking this in the application. This would be the preferred approach. See #1772.

jrtcppv commented 3 months ago

Closed in favor of #1771 and #1772