Handsontable performance problems when filtering true (PRO)

Tags: #<Tag:0x00007efc608a7830>

Hello,

After enabling the filter feature, while holding down an arrow key to scroll, when we have at least 10,000 rows and 100 columns, the grid slows down a lot, up until the point when it almost “freezes”.
Unfortunately, after checking the performance on multiple machines we had to conclude it just must not be a fault on our end.
Depending on the strength of the computer, we can reproduce this even with less amount of cells. (5000 rows 15 cols on an i7 laptop)
Here is an example http://jsfiddle.net/tj0pcptv/

thanks,
David

Hi @david_horvath

Can you share a step-by-step scenario how to achieve the freezing you wrote about? I filtered values by ‘ends with 9’ and scrolled down with an arrow but didn’t get the odd behaviour? Also it would be helpful if you could share your OS/Browser information.

Thanks in advance!

Confirmed. I tried it few times and got the freezing effect.

Thanks for sharing @david_horvath

Just to be sure: you don’t have to actually filter for anything, just enable the filters plugin, but not always slows down/freezes, as you mentioned in your second message.
We tested on Ubuntu 14.04 and Win7 Chrome and FF latest too.

Cheers,
David

Thanks for additional info I was testing on OSX. We’ll take a look at this case.

Thank you

hey guys,

so we talked a lot about the problems with this pro feature during standups and always ended up discussing how vital it is for our product.
Without awesome filtering we just can’t release it.

Do you think you could come up with an estimate of how long it would take to fix the perfomance issue?
Even though we still have a couple of features to complete, the finish line is close.
So we’d be terribly greatful if we knew how long we’d have to delay the release.

Thanks for all the great help and support.
Cheers!

@chris can you take a look at this example? Little laggy at Chrome for OSX but Window 8.1 is much slower (not talking about IE).

@aleksandra_budnik @david_horvath

That’s true. If you turn on trim rows (this is the core plugin behind the Filters) then the performance is noticeably lower. We looked into this and discovered that the modifyRow hook is calling getLength too many times and would need some kind of cache. The way it works now is actually a feature (yeah, I know how it sounds) - Handsontable doesn’t know the exact moment in which user adds/remove rows programmatically (for example from the external code), therefore it checks the number of rows every time the bunch of data is loaded (which is from zero to n and if n is too big then is gets laggy like in your demo).

Some examples to prove my point:

Trim rows turned off: http://jsfiddle.net/owe8fps0/
Trim rows turned on: http://jsfiddle.net/9efcezzb/1/

We estimate that it would take at least one day to develop that caching mechanism and one more to write unit tests and fix the possible issues. 2 days altogether. I think we should be doing this soon but when exactly, can’t say. The only workaround before we improve it is to limit the data rendered in one cycle and use back-end pagination+filtering - we’ve recently improved the support for back-end operations in the Pro version: http://docs.handsontable.com/pro/1.1.1/tutorial-release-notes.html

This is good news. We hope the fix will be quick, easy and bugless. :slightly_smiling:

Any ideas when it could be done? Perhaps in 2-3 or more weeks?

Hey guys,
I’m pretty sure you busy, fixing bugs, working on features and all. So we were wondering whether you could give us an estimate of how long it would take to resolve this issue.
Thank you!

Hi @MORESIMP
Performance issues are always that tricky ones which takes more time for testing. Right now we have few high priority things to fix firstly but as soon as we start to work on this one issue will get updated.

hi there guys, how is the fix going? Thanks for the update. Cheers!

Hi @MORESIMP we’re currently fixing high priority bugs (list: https://github.com/handsontable/handsontable/issues?q=is%3Aopen+is%3Aissue+label%3A"Priority%3A+high") but still checking if it won’t influence the performance in wrong way.

We’re about to start working on it. Head to GitHub issue to track the progress: https://github.com/handsontable/handsontable/issues/3275

Please track changes to https://github.com/handsontable/handsontable/issues/3275 for updates.

1 Like