Performance: Only filter on brush end#898
Conversation
|
I have tested this and it works fine... If I keep the button pressed, the filter only occur when the brush ends... as expected... This improve the performance and usability a lot. However, it looks like there is a lag when I start pressing down the mouse button... There is a delay between the mousedown event and the feedback to the user. Probably something not related to the changes in this PR |
|
That's great, thanks @guilhermecgs. Does it help to set Then again, it's possible that there is some expensive calculation going on between the mousedown and the brush showing. There shouldn't be, but it's possible. |
|
Also, It would be great to add an event to get the preFilter event.. There is only the "filtered"event today Between prefilter and posFilter, I could add a loading css |
|
Hmm, good point - applying the filter can be slow in itself. Right now I guess you could do this by implementing the filterHandler as a pass-through: var oldHandler = chart.filterHandler();
chart.filterHandler(function (dimension, filters) {
// start your loading css here
return oldHandler(dimension, filters);
}) |
Allows coordinate grid charts to only filter on brush end.