From: Benny M. <ben...@gm...> - 2009-10-29 08:43:37
|
2009/10/29 Nick Hall <nic...@ho...>: > With my data the new treemodel runs slower than the old people model. The > old people model was fixed to 2 levels of hierarchy, the new code will > handle any number of levels. I was hoping that the new code could be used > for all hierarchical treeviews. > > I'll have another look at the treemodel to see if I can speed things up. It > may be that we need a third model for the people view with just 2 levels of > hierarchy and use the new model for future models requiring three or more > levels. > > The bug is due to the fact that I extended the search/filter functionality > to handle both "exact" and "contains" type searches. This is only used in > the people view with the gender column at the moment but I added the > functionality to the other model for consistency. As a side issue, when > doing an exact search on gender the drop down still says "gender contains" > which may be misleading. > > In the change I added an extra element to the search tuple. Before it was: > > search[0] = the type (filter, search) > search[1] = a filter or a tuple containing (model column, text, inverted) > > Now search[2] can contain a boolean indicating an "exact" or "contains" > search. > > This is very easy to fix. I fixed it against my working copy but I could > provide a patch against a clean copy of trunk if required. Yes, please make such a small patch so the others don't have issues with this specific item. About improving performance of the present implementation, just give me some time to look at it, before creating a treemodel for peopleview only. There are some optimizations that can be done on the code you submitted. Benny |