Investigate slow startup time and make it faster.
On my 2011 i5 work laptop GnuCash takes an age to start up. My accounts file is currently ~900KB. I run demanding programs like Visual Studio and they are faster to start up and load projects. Why is it so slow? GnuCash is also the only program to cause my music playback to stutter when it starts up. I would hope that this situation could be improved - does it really need 40 seconds to get going?
-
Stephen Baker commented
The SQL got updated in Version 3.7. Now the time that it takes to load the data from a mysql database is reasonable. Still not blindingly fast, but comparable to loading from a file. That saved me from setting up a development for Version 3. The last time that I compiled was Version 2. There is a huge difference in required foundation packages.
-
Stephen Baker commented
I have found that the SQL executed to load all the data is extremely inefficient. On my data set, it takes almost 15 minutes to execute the SQL. Using a more efficient SQL statement returns the same data set in <1 second. This query is an ad-hoc statement cobbled together through string concatenation. I'm looking to see where else the function that creates this statement is used to determine if there are unintended consequences for changing the statement.
slow:
`SELECT * FROM slots WHERE obj_guid IN (SELECT DISTINCT guid FROM splits WHERE tx_guid IN (SELECT DISTINCT guid FROM transactions))`fast:
`SELECT slots.* FROM slots, splits s, transactions t WHERE obj_guid = s.guid AND s.tx_guid = t.guid` -
AdminJohn Ralls (Developer, GnuCash) commented
For those users who see an improvement when the locale is set to UTF-8 or C, see https://bugzilla.gnome.org/show_bug.cgi?id=736189.
Also consider just setting a UTF-8 locale instead of an ISO8859 one. -
Anonymous commented
I experienced VERY slow startup of GnuCash 2.6.3 in Linux when the locale environment variable was not set. For me this helped: "export LC_ALL=C; gnucash". Setting LANG=en_US.UTF-8 also worked.
-
YeOldHinnerk commented
Well, there is a problem no matter what. Admittedly, with open reports it takes much longer, but even without it takes ridiculous amounts of time...
-
xdml commented
Maybe you have left opened some report or chart tabs and during startup GnuCash rebuilds that report/charts. I have already suggested feature "Lazy report/chart generation during startup":
http://gnucash.uservoice.com/forums/101223-feature-request/suggestions/2628144-lazy-report-chart-generation-during-startupTry to close your reports and charts before quitting GnuCash and if your next start is much much faster, than please vote for my suggestion.
Thank you.
-
Felix commented
My experience is similar -- GnuCash is one of the slowest programs to start on my machines.