[reportlab-users] Chasing pyHnj error

Robin Becker robin at reportlab.com
Sun Nov 25 08:47:43 EST 2007


Dinu Gherman wrote:
........

>> I notice that we're using PyObject_NEW as allocation and PyMem_DEL as

>> deallocate. I'm almost sure that's wrong; I'm just not seeing the error.

>> I checked in a change to use the PyObject_DEL in place of PyMem_DEL.

>> Can you give that a try?

>

> Just did that with great success! It now works fine on a MacBook Pro

> and a PowerBook! Thanks a lot! Maybe you want to communicate your

> fix to Danny Yoo so he can update his Python wrapper, too (which

> should not be so different from yours)?

>


Great. It was Python evolving which I suspected at the start.


> See http://hkn.eecs.berkeley.edu/~dyoo/python/pyHnj/index.html and

> dyoo at hkn.eecs.berkeley.edu



done.

As for new paragraph classes I have been messing with Kuchling's
tex_wrap and have managed to get the run time down to something
reasonable. In python I have the time down from over 3.06" to 0.5". This
just corresponds to the simplest of line breakings. His version doesn't
do hyphenation or even follow Knuth's algorithm all that carefully.

I believe it should be possible to improve much further. I translated
simply to pyrex and have the time down again to 0.23". With more
agressive C style coding that should improve further (perhaps another
factor of 10 since my pyrex version is still using lots of python
variables in the main loop).
--
Robin Becker


More information about the reportlab-users mailing list