Gnucash reports

Peter Broadbery p.broadbery at gmail.com
Sat May 18 10:23:10 EDT 2013


Hi Geert,

Thanks for taking a look at the code.  Status update: I'm not actively
changing anything at the moment, the only thing not committed is a
small optimisation to the way %done is calculated.

I'll try to split the major commits and whitespace changes (apologies,
I blame emacs), and improve some of the commit messages; What else
needs to be done prior to getting this merged?

The work so far updates the category reports (Expense/Assets/... over
time) and the net worth barchart -- these were the two bits of code
which really did badly on my data.  As you've probably seen, the major
changes were:
First, ensuring that transactions are only retrieved once and then
processed - the original version was requesting data for each cell in
the report.  The collector feature is probably the major piece here.
Note that scheme isn't a language I've used much, so apologies if the
style is a bit poor.. suggestions welcomed.
Secondly, adding enough testing that I could be reasonably confident
that the reports were identical to existing reports - basically unit
tests and adding temporary menu options for the original reports.
>From memory, there are almost no unit tests for the scheme functions,
but adding some to the build infrastructure was relatively painless.
Testing reports is always painful, and I'm not sure that my current
approach is the ideal - reports are generated into a string, then
parsed and then tested vs. "known" values.

Current plans are - first, get the current changes into a state where
they can be merged (providing that makes sense), and then look at more
performance issues. If some other reports are slow, I may take a look
at those too.

Peter



On Sat, May 18, 2013 at 11:32 AM, Geert Janssens
<janssens-geert at telenet.be> wrote:
> On Saturday 30 March 2013 20:04:13 Peter Broadbery wrote:
>
>> Hi,
>
>>
>
>> I've been modifying the report code to remove the current rather bad
>
>> quadratic behaviour it sometimes displays. Current results take a 10
>
>> second multi-year balance report down below a second.
>
>>
>
>> Would there be interest in getting this work into trunk? Obviously, it
>
>> needs further cleanup and testing, but I thought an early heads up to
>
>> the mailing list would be useful for getting comments.
>
>>
>
>> There is a work in progress in
>
>> https://github.com/pbroadbery/gnucash/tree/topic/pab/blah-reports. It
>
>> adds new reports (prefixed with 'blah' for no good reason), so they
>
>> can be run side by side with the existing reports. It also adds
>
>> various simple tests that exercise both the standard reports and my
>
>> modified versions.
>
>>
>
>> Regards,
>
>>
>
>> Peter
>
>> _______________________________________________
>
>> gnucash-devel mailing list
>
>> gnucash-devel at gnucash.org
>
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
>
>
> Hi Peter,
>
>
>
> I took some time to look at your reports work.
>
>
>
> I noticed it has moved to another branch now:
>
> https://github.com/pbroadbery/gnucash/commits/pab/topic/report-rewrite/v1
>
>
>
> I only read through the commits so far, which is of course not the same as
> actually running the code. But it looks like you have some progress already.
>
>
>
> Can you give a short status update ? What you have done so far, what went
> well, where do you see issues, what will be next ?
>
>
>
> A minor side remark: when you rewrote the chart reports to make use of your
> new collector feature, you fixed lots of whitespace issues in one go. I
> think fixing these whitespace issues is a good thing. However, the way you
> did it (in the same commit that also hold the functional changes) makes it
> rather hard to see the imporant changes at a glance. When you clean up your
> code for inclusion, can you split up that commit in two ? One for all the
> whitespace cleanups and one for the functional changes.
>
>
>
> Thanks for your work so far !
>
>
>
> Geert


More information about the gnucash-devel mailing list