[GNC-dev] Bug 797463 - CSV Import of transactions into a new file hangs

Christian Gruber christian.gruber at posteo.de
Thu Nov 7 17:41:05 EST 2019

Can anybody provide help?

The last change on the relevant functions was done in commit fbf4843f31 
by "lmat" in Dec 2017 between GnuCash versions 2.6 and 2.7. And the 
commit message seems to fit.


Am 04.11.19 um 20:28 schrieb Christian Gruber:
> I have some questions related to Bug 797463 
> <https://bugs.gnucash.org/show_bug.cgi?id=797463>, which I have analyzed.
> The author wrote, that "Gnu Cash hangs", when importing (only two) 
> transactions into a Gnu Cash file with standard accounts list SKR04.
> My analysis showed, that actually Gnu Cash does not hang, but needs 
> really long time for import (several minutes). The problem is, that 
> the author has bayesian matching enabled in his preferences, but the 
> Gnu Cash file is not prepared for bayesian matching (feature 
> GNC_FEATURE_GUID_FLAT_BAYESIAN is not set in the Gnu Cash file). 
> Moreover the Gnu Cash file contains a lot of accounts (approx. 1000).
> Most time is spent in function check_import_map_data(), which is 
> called from gnc_account_imap_find_account_bayes() (Account.cpp). In 
> this function imap_convert_bayes_to_flat() is called, which AFAICS 
> prepares all accounts for bayesian matching.
> I'm not familiar with that conversion step and therefore have several 
> questions:
> Why does the conversion need so much CPU time?
> If the conversion needs so much CPU time, why is it done only 
> temporarily? The conversion is done for each of the two transactions 
> again.
> Why is the conversion even not persistent after the import is done? 
> The feature GNC_FEATURE_GUID_FLAT_BAYESIAN is not set in the Gnu Cash 
> file, even not after the import is finished.
> Regards,
> Christian

More information about the gnucash-devel mailing list