Itamar Turner-Trauring (aka Shtull-Trauring) wrote:
On Sat, 2009-11-28 at 15:05 +0200, MārisR wrote:

I wondering if its possible to load utidylib in thread, do processing
and after this kill thread and release memory? Or maybe something like
deferToProcess?

1. You should report the bug to the utidylib authors, so they can fix it
or pass it on to tidy authors.

2. A thread wouldn't help... but a process certainly would.
https://launchpad.net/ampoule may be helpful if you don't want to
implement your own process wrapper, or you could just run a sub-process
that takes input and output filenames on the command-line and pass data
around that way.



_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Thanks for replay!
I tried pytidylib, and have same issue with memory leak, unfortunately I couldn't report bug to, because, tidylib is self patched by one c programmer, but problem, is that he have no more time for it. After day on playing with ampoule, I got it working :) But I run into another problem, AMP value length is limited to 64kb. Seems its a struct pack limitation. Probably I could split message into chunks <64kb each and feed to amp something like: pp.doWork(Tidy, html={'chunk1': data1, 'chunk2': data2...} )
or maybe there is more easy/clean way?

<<attachment: maris.vcf>>

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to