[GNC-dev] Slow user interface in 3.x gnucash (for large files), and potential optimization

Derek Atkins warlord at MIT.EDU
Fri Jun 15 12:16:27 EDT 2018

John Ralls <jralls at ceridwen.us> writes:

> A very good catch indeed. But pre-constructing the string in
> qofbook.cpp only saves two string constructions per invocation as the
> vector still has to make its own copies. I guess that its much worse
> for you because the ancient gcc on Ubuntu 14.04 (gcc4.8) doesn't do
> small-string optimization.

Is there any reason we cant use std::string& in the vector?  Or do we
think that we might lose references there?

> KVP paths aren't really a good use for std::string anyway: It's a lot
> of weight for something that's used as a human-readable index. Even
> static char[] is heavy for this purpose. We could get a huge boost if
> we use something like Glib's quarks [1]. They can be expanded to their
> string value for storage so that we don't break file/db compatibility.
> Want to have a go at that?

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list