← Back to team overview

openerp-chinese-team team mailing list archive

Re: [Merge] lp:~openerp-chinese-team/openobject-server/V6 into lp:openobject-server

 

> On Sunday 19 December 2010, you wrote:
> > digitalsatori has proposed merging
> > lp:~openerp-chinese-team/openobject-server/V6 into lp:openobject-server.
> >
> > Requested reviews:
> >   OpenERP Core Team (openerp)
> >
> >
> > register fonts only when needed to improve the report process speed
> 
> Well, I have a few objections to that:
> 
> 1. Please don't touch lines you don't intend to alter. Those ones at the
> copyright header, spacing changes etc must NOT be in the commit. It is
> important.
> 
> 2. "if name not in pdfmetrics._fonts: " doesn't sound right. When you issue a
> "registerFont" directive, it should /always/ register the Font, IMHO. Or else
> the result would be a bit arbitrary, it would depend on other modules having
> registered the same font in a different way, wouldn't it? In my opinion,
> again,
> it is better to get an error if two modules try to map the same font to
> something different, than silently pick one of them, randomly.

1. my bad, I touched those line by accident and didn't notice when commit the changes, I've reverted it back

2. Probably my comment on the commit confused you, my intension is to register the custom font only once and better off before the report rendering time.
My modification of the code greatly improve the report processing time when the big Chinese font file involved. I've timed the difference on my computer with and without the condition test, with the test the process time is negligible, without the test every report will spend above 3.5 seconds.

-- 
https://code.launchpad.net/~openerp-chinese-team/openobject-server/V6/+merge/44161
Your team Open ERP Chinese is subscribed to branch lp:~openerp-chinese-team/openobject-server/V6.



Follow ups

References