[GNC-dev] Next shot at "Slow user interface in 3.x gnucash (for large files)"

Christian Stimming christian at cstimming.de
Sun Jun 17 16:38:57 EDT 2018

Dear all,

after the initial success in resolving some of the malloc/free calls due to 
vector<string> allocation for speeding up the user interface for large files, 
I looked into some more causes of slower reaction time in the user interface.

The function xaccSplitOrder is one that is called quite often. This may or not 
may not be ok, but there's a huge performance hit of that function:

80% of its runtime instructions are needed for the following line 
(Split.c:1479 in maint):

  action_for_num = qof_book_use_split_action_for_num_field
        (xaccSplitGetBook (sa));

I.e. the function qof_book_use_split_action_for_num_field is very very 
expensive. Currently it does a KVP lookup on each call. What keeps us from 
turning this KVP value into a normal gboolean value in the struct _QofBook? 
What steps are needed to turn a KVP value into a normal data member? (We don't 
happen to have a short todo list for that case, do we :) Does anyone happen to 
know the necessary steps from memory? This would help a lot here. Thank you 
very much.



More information about the gnucash-devel mailing list