[reportlab-users] [Jython2.5.1] issue: Invalid method Code length 656615 + patch proposal

Andy Robinson andy at reportlab.com
Wed Feb 10 10:03:22 EST 2010


2010/2/10 Raphaël Valyi <rvalyi at gmail.com>:

> Hello guys,

> I should say I'm sad to see that despite I provide you that trivial patch

> one year ago on that mailing list

> and you still did nothing for Jython,


I cannot remember the reason why we didn't apply it, but there was
one. We probably misunderstood this as a bug in Jython which we
thought would be fixed soon, or maybe we just got very busy with
commercial projects, and none of us touch Java code in a normal month.
If this happens again just keep asking.



> despite even the clear failure of Unladen Swallow to save CPython (only 1.5

> faster at best while using more memory;


What, have they given up forever already? All this means to me is
that Guido, Tim and co did a pretty good job...


> If you want really good Jython support with decent performance,



To be perfectly honest, YOU want that. We saw ZERO interest since
we did a 100% robust port in 2003. Every commercial customer we have
is running CPython, we don't seek to employ Java skills, and we want
to spend our time on new features and serving them. Therefore,
we'll try to handle patches as and when they are sent in, as long as
we understand why, but we cannot make it a major focus.

Somebody will also need to update the _rl_accel.java we wrote, and
check if our PIL-replacement-code still applies, to get halfway decent
performance.

And if anyone is then using ReportLab in Jython successfully, tell us
about it, or submit a case study or something!



> I remind you the logic: because Jython will map each Python method to a Java

> method and because by specification, the JVM is limited regarding to the

> method size, we need Python programs to avoid methods that are too fat such

> as the ones found in your fontdata.py file (a general good practice in

> software engineering BTW).


I agree that a code method above 64k would probably be a bit too long.
However, this is a single, static, in-memory singleton data structure
which is key to our library, and we might need more of the same as we
get more multilingual. Failure to handle it is a weakness in Jython -
but I agree we will work around it...

- Andy


More information about the reportlab-users mailing list