Re: [tryton-dev] performance of chart of accounts?

2017-01-23 Thread Cédric Krier
On 2017-01-23 07:16, Richard PALO wrote:
> [2nd resend via gmane... googlegroups seems busted as usual]

Nothing to do with google groups, we configured to not allow anonymous
post, only members can. It is configured on gmane if there was still a
web interface.

> Perhaps related to previous discussion of GL and perhaps of Issue4028 and co,
> I have two bookyears in a db now under tryton 4.2 with PCG French
> (neither closed yet) and a total of 103 movements (2/3 from older bookyear)
> 
> Opening the chart of accounts for the later year (2016), selecting
> the only line 'Plan comptable (French)' and doing a full expand ('+')
> takes on the average 4 *minutes* on a quiet system!

Full expand is quiet expensive because of the behavior of GTK.
It triggers an event on each node to open them. The client tries to
optimize as much as possible. We load all sibling children of the first
parent at once to minimize the number of queries. But it is a compromise
between manual expand and automatic expand.

> It seems to peg a single core on a 32GB 12*core system (2,3G AMD 6338P)
> running PostgreSQL 9.6.1 locally and directly on the socket (not the tcp 
> port).

Usual Python threading model. The embedded server is the default
from Werkzeug which is only threaded. For better performance it is
better to use a pre-forked WSGI server.
But for this case, it will not change anything because each queries are
serialized, they depend on the result of the previous to do the next one
(read children to request the second children level).

> Are there any tuning remedies? If not, what would things be like if we
> were to migrate a company with an average of over 5500 movements per year?

Normally it should not depend on the number of moves. For me, the
slowness is the number of queries but not the computation of the
balance/debit/credit. Those computations should be almost linear (with a
very small coefficient).

> Also, unfortunately it appears that the 'views' still only update the final
> balance field and not the debit/credit fields.
> I thought I already filed an issue including that way back but can't seem to 
> find it.
> Is it on 'purpose' to exclude displaying the total movements debit/credit as 
> well as,

Yes it is on purpose (since 1.0).

> eventually, the initial balance in the chart of accounts?

I guess you are looking for the General Ledger instead of the Chart of Account.
(which will load much faster as it is a list)

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20170123205341.GX68908%40tetsuo.


[tryton-dev] performance of chart of accounts?

2017-01-23 Thread Richard PALO

[2nd resend via gmane... googlegroups seems busted as usual]

Perhaps related to previous discussion of GL and perhaps of Issue4028 and co,
I have two bookyears in a db now under tryton 4.2 with PCG French
(neither closed yet) and a total of 103 movements (2/3 from older bookyear)

Opening the chart of accounts for the later year (2016), selecting
the only line 'Plan comptable (French)' and doing a full expand ('+')
takes on the average 4 *minutes* on a quiet system!

It seems to peg a single core on a 32GB 12*core system (2,3G AMD 6338P)
running PostgreSQL 9.6.1 locally and directly on the socket (not the tcp port).

Are there any tuning remedies? If not, what would things be like if we
were to migrate a company with an average of over 5500 movements per year?

Also, unfortunately it appears that the 'views' still only update the final
balance field and not the debit/credit fields.
I thought I already filed an issue including that way back but can't seem to 
find it.
Is it on 'purpose' to exclude displaying the total movements debit/credit as 
well as,
eventually, the initial balance in the chart of accounts?

cheers

--

Richard PALO

--
Richard PALO


--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/o6474i%24mkt%241%40blaine.gmane.org.