Hello, 

I've investigated the infamous stutterer @t @ta @tag problem.

I've found out that it happens in the get_n_nodes of the filtered tree.

The function basically does this :


if cached_value for n_nodes(filters=f) return it.
else 
 for each node:
    if node is displayed with filter(f):
         n += 1
cached_value = n
return n


Well, the problem lies when filter f is not yet created ! If we return
"True", we have the stuttering problem. If we return False, we loose
dynamic update of the tag tree.


The key point then is to understand :

- why are we asking to get_n_node(filter) for a filter that doesn't exist
yet ?

As filters are mostly related to tags, that tags use get_n_nodes heavily,
I think that, at some point when we create a tag, we call get_n_node before
creating the filter.


I have to go but I wanted to share this with you. I will probably fix that
tomorrow if nobody does it before.


Lionel


_______________________________________________
Mailing list: https://launchpad.net/~gtg-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~gtg-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to