Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default _filterHandler performs unnecessary filter clear ? #960

Closed
Sumbera opened this issue Jul 14, 2015 · 4 comments
Closed

default _filterHandler performs unnecessary filter clear ? #960

Sumbera opened this issue Jul 14, 2015 · 4 comments

Comments

@Sumbera
Copy link

Sumbera commented Jul 14, 2015

first call in default _filterHandler resets all filter. I don't think this is needed as all filters are anyway controlled by filterFunction.

   var _filterHandler = function (dimension, filters) {
    dimension.filter(null);  // --  is this really  needed ?

this is causing unnecessary cycles for adding all data back and then removing all of them based on added filter (or vice versa). My guess is it somehow breaks incremental nature of crossfilter. Commenting this out caused less calls to custom reduce functions (while keeping same correct filtering behavior). crossfilter used is 1.3.11

@gordonwoodhull
Copy link
Contributor

Thanks @Sumbera. Have you tried running the test suite to be sure?

@Sumbera
Copy link
Author

Sumbera commented Jul 14, 2015

run grunt test : 38 specs in 33.066s. 0 failures

@Sumbera
Copy link
Author

Sumbera commented Sep 30, 2015

Great, this performance problem has been fixed in 2.0.0 beta 19
•Enable crossfilter optimizations by not resetting the filter

@gordonwoodhull
Copy link
Contributor

Ah, thanks for pointing this out, should have pointed to this in the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants