anntzer / mplcursors

Interactive data selection cursors for Matplotlib.
https://mplcursors.readthedocs.io
zlib License
113 stars 19 forks source link

Remove workaround to improve cursor selection performance #81

Closed TheRikke closed 2 months ago

TheRikke commented 2 months ago

This change reduces the time it takes from selection until the annotation is visible to 10%. In my use case with around 4500 lines it previously took 47s. After this change it only takes around 5s. The workaround mentioned in the code is for a defect which was fixed in 2022.

anntzer commented 2 months ago

Thanks for the report. I pushed a slightly different version which maintains back-compatibility with older versions of matplotlib, but should achieve the same speedup.