[Kmymoney-devel] Startup is slow

Thomas Baumgart thb at net-bembel.de
Thu Aug 20 07:47:15 UTC 2015


sorry for the delay in answering. I do filter all MS-Windows related mails to 
a separate queue and look into them only every now and then.

On Thursday 06 August 2015 19:46:43 jeffjl.kde at outlook.com wrote:

> Hi all,
> I am new to KMyMoney (and KDE). I'm thinking KMyMoney could be my
> replacement for Quicken (I'm getting more and more fed up with them).


> But I do have some issues.
> At the top of my list is that, at startup, KMyMoney spends literally minutes
> in the KHomeView::investmentBalance() function.  I have imported my QIF
> from Quicken into KMyMoney and I have thousands of historical holdings for
> which my share balance is now zero (the vast majority of them are expired
> put and call options, which is going to lead to some more things on my
> issues list). I suspect it must be going through each one of those. I know
> it spends over a minute in that for() loop for each of several calls to the
> function (I have more than one brokerage account). I  looked for an easy
> way to not waste time calculating a balance for a stock account when there
> are zero shares in the account, but I don't see it. But I am a long way
> from understanding all of the code.  It checks for stock.IsClosed(), but
> since these came in from Quicken, the stock accounts are not closed.
> I am building on Windows with MSVC2013 via emerge.  So debugging is pretty
> much limited to watching program flow.  (I don't see "readable" variable
> values, for example.)
> Any thoughts or guidance? I am willing and able to change my copy of the
> code and try things.

And I am sure we can guide you through it. You should probably make sure that

- you are subscribed to this list (the devs main communication channel)
- use "git master" source code and clone the repo 
(git://anongit.kde.org/kmymoney.git) if you have not done already
- post your patches to https://git.reviewboard.kde.org for review
- remind us if you don't get an answer within a few days.

Unfortunately, I have not used MSVC in ages and also not with KDE code, so I 
won't be of much help if it comes to details how to do debugging there. I 
wonder though, that it is not possible to single step through the code and 
look at some variables, or did I misunderstood your comment above?). A couple 
of things which I can thing of:

- Make sure to build with CMAKE_BUILD_TYPE=Debugfull which gives you new menu 
options at runtime:
  - 'Tools/Debug Timers'. You can then add call to the ::timestamp() function 
(in main.cpp) in the code to get timing values on stdout (shell window).
  - "File/File information" showing details about your data. Can you post a 
screenshot of that information here to let us know something about the number 
of items in your file? (I attach mine here for reference)

  It might also provide you access to variable values

- If you have questions please ask here

One thing that crosses my mind regarding the startup process is that you can 
reduce the amount of information shown on the home page using the settings 
dialog. This probably also helps to identify which part of the code causes the 
most delay.

Again, sorry for the delay which is certainly not the normal situation.



Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
Of all the computing resources available, the most valuable one is
programmers' time. Especially in open source where most of us have to
sneak in time to write and debug code. (Ace Jones)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileInformation.png
Type: image/png
Size: 44662 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20150820/c914d8b3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20150820/c914d8b3/attachment-0001.sig>

More information about the KMyMoney-devel mailing list