[Geany-devel] Speed up & simplify stash tree display/update

Nick Treleaven nick.treleaven at xxxxx
Wed Oct 19 12:20:41 UTC 2011

On 18/10/2011 18:46, Nick Treleaven wrote:
> On 18/10/2011 18:31, Dimitar Zhekov wrote:
>> Also, the stash_tree_action:_get_iter_first, _iter_next should be
>> written as gtk_tree_model_foreach(model, stash_tree_handle_pref,
>> action). It's ~15% slower, but that doesn't matter any more.
> I'm not sure that's really neater. If C had lambda support then yes.
> Casting to gpointer is ugly.

BTW what you suggest would be fine, I just mean it doesn't seem worth 

>> And of course, stash_foreach_various_pref can be inlined into
>> stash_tree_setup, and call stash_tree_append_pref directly, or
>> even inline it too.
> Not sure it's worth it, maybe.

I think stash_tree_setup is too long for any inlining, but I replaced 
stash_foreach_various_pref with a specific function as this is neater.

More information about the Devel mailing list