Startup time

hasmeta at yahoo.com hasmeta at yahoo.com
Mon Aug 17 14:01:58 EDT 2009


> "hasmeta at yahoo.com" <hasmeta at yahoo.com> writes:
> 
> > How can one opt not to load various modules so that
> gnucash starts more quickly? I've noticed that during
> startup on my Windows XP system, it loads many components
> that I either don't ever or rarely use. Here's a snippet of
> some of the lines from the splash screen that I could
> catch:
> >
> > gnucash/report: I am assuming it loads available
> reports here. Is it possible to load them dynamically upon
> request?
> 
> No, there's no way to load them dynamically upon request
> because GnuCash
> builds the menu items of reports dynamically.  This
> lets you effectively
> drop in new reports and GnuCash will just load them and put
> them into
> the menu for you.  You can't have it both ways, and
> IMHO being able to
> dynamically add reports is more important.
> 

I may be over my head in the internals of the implementation, so correct me if I am wrong, but from what you say, it seems that startup code is going through all shared libraries in some directory, loading them, then calling some function to get report characteristics and then add it to the reports menu. This wouldd explain why building a menu of less than 50 items total is taking such a long time. And if I wanted to add in an additional report, I'd have to copy the shared library into that directory, then restart gnucash so that the report would appear on the menu?

I am not against dynamically building menu items; my point is, building menu items shouldn't take that long. Why not cache the results into some text file, and, at next startup, if the text file exists, read report characteristics from there instead? That way, you can build the menu in a second or less. You could repopulate the text file after startup in a low priority thread or put in a menu item that says "Refresh Reports" to repopulate the text file and recreate the menu.

> > gnucash/business (?): I don't use business
> functionality at all; can this simply be removed through
> some configuration file?
> 
> Yes, you can remove the business modules.  But there's
> no configuration
> file you can use to turn this off (although that's not a
> bad idea).  You
> need to remove the business module files and then gnucash
> wont load them.
> 
> > Checking Finance::Quote: Why check every time at
> startup? Can't this be delayed until I request to get a
> quote?
> 
> It's done as a test to see whether to enable the Get Quotes
> button.
> If it cannot find F::Q then the Get Quotes button remains
> greyed out.
> 
> That's why it's done every time.

I realize that, but it takes noticeably long for the perl checker script to load, run and return the results back to gnucash: about 4 seconds on my Intel Core XP machine. This is a lot of time just to determine if a menu item is to be greyed out. Also, a greyed out menu item doesn't give any feedback to the user as to what may be broken.

So why not keep it always on? When the user chooses it, you spawn whatever perl script is necessary to get the quotes. If the process fails, because there's no perl, you say, 'this feature depends on perl, please install it'. If the process fails because perl couldn't find Finance::Quote in @LIB, you say 'install Finance::Quote'. If no internet, 'check internet/proxy settings', so on and so forth...

Lastly, I appreciate all the effort that the developers of this software have put together (and even with a relatively longer startup time due to this or that, I am *not* going back to Quicken).

--Hasmet

> 
> > --Hasmet
> 
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> 
> -derek
> -- 
>        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-user mailing list