[reportlab-users] patch to make Reportlab work again on Jython

Raphaël Valyi rvalyi at gmail.com
Fri Jan 30 14:44:29 EST 2009


Robin,
no Jython has been far from regressing. Actually the Jython bug has
been first reported in 2002. I'm guessing that the reason why it broke
up is that may be this file just got fatter. As it will be compiled to
only one method body, that could explain why it's now broken.

Raphaël Valyi

On Fri, Jan 30, 2009 at 2:20 PM, Robin Becker <robin at reportlab.com> wrote:

> Raphaël Valyi wrote:

>>

>> Dear Reportlab developers,

>

> ........

>>

>> Proposed patch:

>>

>> So, advised by Charles Headius Nutter (the JRuby rock star who work

>> around the kind of issue), I came up with a patch for the reportlab

>> file (/reportlab/pdfbase/_fontdata.py), wrapping each of those very

>> large list declarations inside dumb private method so that no method

>> will get larger than the allowed size. I admit it, that's not

>> particularily elegant. But it's not too ugly either and easy to

>> refactor the right way when the Jython bug get fixed (after OpenERP on

>> Java makes Sun release how much important this is). But more

>> importantly, it's working and allow using Reportlab in Jython again

>> (at least on Jython trunk, expect release in February)!

>>

>> So please could you consider including the attached patch (the whole

>> file actually) in your trunk distro (it's made from the trunk SVN).

>> I'm very sure it has not perf impact at all either. On the contrary,

>> running on Jython could soon give you a serious boost when everything

>> will JIT just as nicely as in JRuby.

>>

>> What is your position regarding to this?

>>

>>

>> Raphaël Valyi

>> www.smile.fr

>

> .......

> well we have an old working implementation that ran under jython which you

> can check out at

>

> http://svn.reportlab.com/svn/public/reportlab/branches/Jython-branch/reportlab

>

> In that code (which is now 5 years old) we did not find it necessary to

> touch any large arrays at all in _fontdata. So has jython regressed or is it

> java that's changed?

> --

> Robin Becker

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>



More information about the reportlab-users mailing list