This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (












Implement proper binary search in hover support.
by rfunduk
Implement proper binary search in hover support.
i implemented this (and apparently deleted without ever saving). it actually doesnt speed up the labels noticeably!
the slowness seems to be because every time there is a mousemove event, the entire image is redrawn.
this is because onMouseMove calls cleanup() which calls draw(). i dont know why the draw() call is in cleanup.... i removed it and cant see the difference.
if draw() is not called every time, it might make sense to do binsearch. and i can do that as i’ve done it once...
by brentp
Implement proper binary search in hover support.
cleanup() needs to be called, here’s why:
When you hover over a point you get a callback in which you normally call highlightSelected(...). This draws a ’fake’ data series with one point at the location of your hover on the graph which needs to be ’removed’ whenever you move the mouse so you dont leave those points all over the graph. This could probably be re-organized a little bit (and is being reorganized in the 1.0 ’refactoring’) to only cleanup in certain situations/less often. But the problem is that you want to remove the highlighted point when you move out of range of the point OR to another point, so it’s a bit more complex than it seems.
I think binary search will speed up the searching quite a bit for huge datasets and hardly at all for datasets of less than, say, 100 data points.
by rfunduk
Implement proper binary search in hover support.
i see. here’s a start of binary search, works for time series. probably should require some flags in opts. see commit message:
http://github.com/brentp/flot/commit/f2c8ccd622cd54fbddfa2cdb8f74bb173e6f0ca5
by brentp