biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
12 stars 15 forks source link

Improve annotation performance #249

Open mzur opened 4 years ago

mzur commented 4 years ago

The image annotation tool freezes for a short time whenever a new annotation is created (after the request returns), once there are a couple of thousand annotations on an image (tested with ~3000 point annotations). This is an edge case for regular images but could happen easily for gigapixel images.

The freeze is caused by the update of the annotations array which is made reactive by Vue. This can probably be implemented more efficiently, e.g. by bypassing reactivity/props and access component methods directly, or by using Object.freeze on the annotation objects. However, this is a significant amount of work and requires thorough testing, as the annotation canvas is a core component which is also used elsewhere in BIIGLE (e.g. MAIA, ananas).

mzur commented 1 year ago

We also had a similar report for a video with more than 10k annotations. Maybe there is a similar bottleneck in the video annotation tool? See also https://github.com/biigle/core/issues/417