Skip to content

Conversation

@jibap
Copy link

@jibap jibap commented May 20, 2016

Add an option (disableFilteringWatchers) to permit to disable watchers on filters which can slow behaviour and not necessarly needed (external filtering and/or custom filter templates)

Add an option to permit to disable watchers on filters

// if column is filterable add a filter watcher
if ($scope.filterable) {
if ($scope.filterable && !uiGridCtrl.grid.options.disableFilteringWatchers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swalters or @AgDude You guys have a thought on this?

@AgDude
Copy link
Contributor

AgDude commented May 27, 2016

I would like to see a benchmark on the improvement before considering this. A single watcher per column seems like any performance improvement would be tiny.

@jibap
Copy link
Author

jibap commented May 30, 2016

Performance is slowed not by watcher but by the callback of this one :

uiGridCtrl.grid.api.core.raise.filterChanged(); uiGridCtrl.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN ); uiGridCtrl.grid.queueGridRefresh(); 

The visible effect is that the cursor into input is frozen for some milliseconds (seconds if the grid is big or complex).
Without watcher, this not happen.

@AgDude
Copy link
Contributor

AgDude commented May 30, 2016

That sounds reasonable then. Can you please provide a plunker, I have not observed this.

At the very least this will need documentation.

I assume then it is left up to the developer to refresh the grid after the filter input is complete. Might it be better to build in the refresh on blur instead of removing it completely?

@mportuga
Copy link
Member

mportuga commented Nov 7, 2016

Closing due to inactivity.

@mportuga mportuga closed this Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants