Re: [GNC-dev] Next shot at "Slow user interface in 3.x gnucash (for large files)"

2018-06-17 Thread John Ralls


> On Jun 17, 2018, at 1:38 PM, Christian Stimming  
> wrote:
> 
> Dear all,
> 
> after the initial success in resolving some of the malloc/free calls due to 
> vector allocation for speeding up the user interface for large files, 
> I looked into some more causes of slower reaction time in the user interface.
> 
> The function xaccSplitOrder is one that is called quite often. This may or 
> not 
> may not be ok, but there's a huge performance hit of that function:
> 
> 80% of its runtime instructions are needed for the following line 
> (Split.c:1479 in maint):
> 
>  action_for_num = qof_book_use_split_action_for_num_field
>(xaccSplitGetBook (sa));
> 
> I.e. the function qof_book_use_split_action_for_num_field is very very 
> expensive. Currently it does a KVP lookup on each call. What keeps us from 
> turning this KVP value into a normal gboolean value in the struct _QofBook? 
> What steps are needed to turn a KVP value into a normal data member? (We 
> don't 
> happen to have a short todo list for that case, do we :) Does anyone happen 
> to 
> know the necessary steps from memory? This would help a lot here. Thank you 
> very much.

Christian,

It’s all about file compatibility, remember? As it stands, if you make 
something a regular member variable then you have to change the schema to add 
the element/column, and write a scrub to update older data. We strongly prefer 
not to do that during a stable release cycle and generally require that the 
last version of the previous stable series be able to read both formats.

One alternative would be to redo the backends so that member variables can be 
designated as stored in KVP, effectively moving KVP out of engine. That would 
be a bit of work but it’s an alternative to changing the schemas. It’s a route 
we’ve discussed before but nobody’s been inclined yet to take it on.

The less involved approaches would be to cache the value or to make KVP 
retrieval more efficient. I suspect in this case that caching will be the 
easiest.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] Next shot at "Slow user interface in 3.x gnucash (for large files)"

2018-06-17 Thread Christian Stimming
Dear all,

after the initial success in resolving some of the malloc/free calls due to 
vector allocation for speeding up the user interface for large files, 
I looked into some more causes of slower reaction time in the user interface.

The function xaccSplitOrder is one that is called quite often. This may or not 
may not be ok, but there's a huge performance hit of that function:

80% of its runtime instructions are needed for the following line 
(Split.c:1479 in maint):

  action_for_num = qof_book_use_split_action_for_num_field
(xaccSplitGetBook (sa));

I.e. the function qof_book_use_split_action_for_num_field is very very 
expensive. Currently it does a KVP lookup on each call. What keeps us from 
turning this KVP value into a normal gboolean value in the struct _QofBook? 
What steps are needed to turn a KVP value into a normal data member? (We don't 
happen to have a short todo list for that case, do we :) Does anyone happen to 
know the necessary steps from memory? This would help a lot here. Thank you 
very much.

Regards,

Christian
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Budgets: showing total-to-date in budget period, and previous month totals only

2018-06-17 Thread Christopher Lam
Hi Phil
I've taken the liberty of fixing up your YTD-budget, renamed to budget-ytd.
I don't use budgeting myself and cannot check figures. But it seems useful
enough.
https://github.com/christopherlam/gnucash/tree/master-ytd
Would you be kind to double check it works as expected in 3.1/maint onwards?
C

On 26 March 2018 at 20:04, Phil Longstaff  wrote:

> I have attached a report which does this.
>
> I have attached ytd-budget.scm. I have this file in
> c:\Users\phill\.gnucash\reports. I then add this line to
> c:\Users\phill\.gnucash\config.user:
>
> (load "c:\\Users\\phill\\.gnucash\\reports\\ytd-budget.scm")
>
> This gives me a new "YTD budget" with 3 sets of columns:
> 1) selected month
> 2) year-to-date
> 3) full year
>
> It always shows actual and budget amounts, and there is an option to add
> difference. There is also an option to select which month you want to show.
>
> On Sun, Mar 25, 2018 at 7:21 PM, Macho Philipovich 
> wrote:
>
> > Dear Gnucash Users,
> >
> >
> > I am looking to for a report/view that will show
> > budgeted/actual/difference amounts for selected accounts for the
> > previous month, as well as the totals for all months to date in the
> > current budgeting period.
> >
> >
> > The wiki seems to suggest that GnuCash does not natively support this,
> > but that it's possible using the third-party "Little Budget Tool":
> >
> >
> > https://wiki.gnucash.org/wiki/Budget_History#Add-On:_.22The_
> > Little_Budget_Tool.22
> >
> >
> > When I tried to download and compile the said software, however I didn't
> > get anywhere. I couldn't get ./configure to recognize the presence of
> > qt, and when I told it to ignore, it balked on the first g++ command. On
> > the one hand, it would not surprise me to learn that I'm just not doing
> > the configure && make process properly. On the other, this software was
> > last revised thirteen years ago.
> >
> >
> > Any advice you can provide on getting the report view I'm looking for
> > would be greatly appreciated!
> >
> >
> > Thanks,
> >
> > Macho
> >
> >
> > ___
> > gnucash-user mailing list
> > gnucash-u...@gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see
> > https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> >
>
> ___
> gnucash-user mailing list
> gnucash-u...@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel