Quote Originally Posted by miraks View Post
In fact reset is called only 3 times for this table:
So reduce it to 0. There is a 99% chance you don't need it.

So, I can't reduce the number of call to reset.
Sure you can. You can remove all rows and insert new ones, if you have to. It'll be much faster than calling reset. And you don't have to reset an empty model.

Your data() implementations are very complicated, try simplifying them. Here are some hints:
- don't compare strings, compare enums, single characters, ints or hashes from strings
- cache, cache, cache
* don't recompute data, cache it - there is a chance it'll be needed soon
* if you compute data for the item, compute not only the display role, but all roles - the view will query for more than one role for each index, why repeat calculations?