← Back to team overview

openerp-expert-accounting team mailing list archive

Re: general ledger optimization

 

On 05/26/2010 11:25 AM, Ferdinand Gassauer wrote:
> Am Freitag 21 Mai 2010, 11:24:17 schrieb Antony Lesuisse:
>> I'm working on the accouting reports, the first issue was the performance
>> of the general ledger report.
> IMHO also c2c and OpenERP are working on this issue
>
> for the RML engine itself pls see
> https://bugs.launchpad.net/bugs/581800
> a solution to this will boost performance

The problem is the rml and pdf engine (report lab code), not database access as you can see in the latest profile below for 320 move_lines on an atom cpu (of course this is much faster on a Core2Duo).

Intial time was 57 sec
Fixing the sql queries -> 36sec
Fixing rowHeight -> 23sec

An it now scale linearly.

2560 lines 102.453 seconds from 960.809 seconds
1280 lines 49.205 seconds from 299.278 seconds

previous benchmarks from friday:

320 lines 19.832 seconds from 48.544 seconds
640 lines 40.835 seconds from 120.057 seconds


create_pdf (/home/wis/stuff/version/openerp/bazaar/openerp_openobject-server_trunk/bin/report/interface.py:182)
function called 1 times

1503080 function calls (1489798 primitive calls) in 23.151 CPU seconds

   Ordered by: cumulative time, internal time, call count
   List reduced from 607 to 40 due to restriction <40>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000   23.200   23.200 interface.py:182(create_pdf)
        1    0.000    0.000   23.200   23.200 render.py:47(render)
        1    0.000    0.000   23.200   23.200 rml.py:41(_render)
        1    0.039    0.039   23.200   23.200 trml2pdf.py:816(parseNode)
        1    0.000    0.000   23.159   23.159 trml2pdf.py:208(render)
        1    0.000    0.000   23.122   23.122 trml2pdf.py:803(render)
     11/1    0.000    0.000   12.736   12.736 trml2pdf.py:723(render)
     11/1    0.001    0.000   12.736   12.736 trml2pdf.py:724(process_story)
  3654/12    0.246    0.000   12.384    1.032 trml2pdf.py:595(_flowable)
     11/6    0.303    0.028   12.354    2.059 trml2pdf.py:500(_table)
        1    0.038    0.038   10.386   10.386 doctemplate.py:848(build)
       49    0.006    0.000   10.235    0.209 doctemplate.py:735(handle_flowable)
       48    0.005    0.000    9.563    0.199 frames.py:136(_add)
  3655/28    0.158    0.000    9.489    0.339 flowables.py:101(drawOn)
  3655/28    0.050    0.000    9.479    0.339 flowables.py:84(_drawOn)
    21/16    0.052    0.002    9.477    0.592 tables.py:1270(draw)
3616/3586    0.442    0.000    9.386    0.003 tables.py:1350(_drawCell)
3984/3633    0.155    0.000    5.139    0.001 trml2pdf.py:486(_textual)
     4039    0.487    0.000    4.794    0.001 utils.py:98(_process_text)
     3633    0.057    0.000    4.551    0.001 paragraph.py:802(__init__)
     3633    0.131    0.000    4.494    0.001 paragraph.py:816(_setup)
     3633    0.061    0.000    3.957    0.001 paragraph.py:966(draw)
     3633    0.468    0.000    3.896    0.001 paragraph.py:1264(drawPara)
3657/3627    0.229    0.000    3.304    0.001 tables.py:357(_listCellGeom)
     3633    0.154    0.000    3.088    0.001 paraparser.py:1025(parse)
3679/3649    0.052    0.000    2.793    0.001 flowables.py:113(wrapOn)
     3685    0.170    0.000    2.734    0.001 paragraph.py:834(wrap)
     3685    0.464    0.000    2.476    0.001 paragraph.py:972(breakLines)
5554/4254    0.727    0.000    2.432    0.001 {eval}
    11633    0.389    0.000    2.119    0.000 report_sxw.py:280(_translate)
4865/4863    0.344    0.000    1.963    0.000 misc.py:780(cached_result)
     3633    0.154    0.000    1.871    0.001 {built-in method feed}
    16105    0.524    0.000    1.305    0.000 utils.py:54(_child_get)
3633 0.089 0.000 1.257 0.000 paragraph.py:100(cleanBlockQuotedText)
    10754    0.367    0.000    1.118    0.000 paragraph.py:59(split)
     9730    0.101    0.000    1.113    0.000 misc.py:717(_generate_keys)
   108583    0.887    0.000    1.108    0.000 {hasattr}
4902/4865    0.428    0.000    1.012    0.000 misc.py:722(to_tuple)
     9812    0.642    0.000    0.978    0.000 {_rl_accel.stringWidthU}
     1631    0.087    0.000    0.963    0.001 report_sxw.py:242(formatLang)



Follow ups

References