juglab / labkit-ui

Advanced Tool for Labeling And Segmentation
BSD 2-Clause "Simplified" License
33 stars 20 forks source link

LabelPanel: faster removeAllLabels #102

Closed David-Ciz closed 1 year ago

David-Ciz commented 1 year ago

Hi,

removeAllLabels() in LabelPanel is very slow when called on larger amounts of labels. This is due to fireLabelsChanged() being called after every item. This small change speeds up the deletion and increases stability.

maarzt commented 1 year ago

@David-Ciz Thank you for the PR. It is nice simple and very reasonable. Sorry for the late merge.

Did you test if this fixes the performance problem as intended?