[reportlab-users] Apache vs. reportlab.pdfgen.canvas.Canvas object

Aaron Watters reportlab-users@reportlab.com
Wed, 04 Dec 2002 12:26:13 -0500


--------------060006020402020104010206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Even if you fix this I don't recommend you use modpython for this.

The problem is that the reportlab packages are designed to work
primarily in transient processes, and they may (probably will) cause
memory leaks in apache if you use mod apache.  Of course, since
the apache processes commit suicide every so often maybe you
don't have to worry about it (I don't know enough about it).

Another problem may be that the
reportlab modules are not thread safe, but that is only a problem if
modpython uses threading.

Use a cgi script instead, maybe? (or launch a subprocess in
some other manner?)  I don't think you'll see too much of
a performance difference.

   -- Aaron Watters

Z˙ber Martin wrote:

>Hello,
>
>I have 'dir'ed the reportlab.pdfgen.canvas module - it seems that there are all attributes and objects, except Canvas.
>
>Martin
>
>>-----Original Message-----
>>From: Andy Robinson [mailto:andy@reportlab.com] 
>>Sent: Wednesday, December 04, 2002 1:08 PM
>>To: reportlab-users@reportlab.com
>>Subject: RE: [reportlab-users] Apache vs. 
>>reportlab.pdfgen.canvas.Canvas object
>>
>>
>>>def handler(req):
>>>	...
>>>	c = reportlab.pdfgen.canvas.Canvas("/some/file.pdf")
>>>	...
>>>
>>No ideas myself.
>>
>>Does mod_python do any lazy caching of Python modules?
>>Try making it to 'dir' on the object reportlab.pdfgen.canvas 
>>and display some of its attibutes in HTML.
>>
>>Thanks,
>>
>>Andy
>>_______________________________________________
>>reportlab-users mailing list
>>reportlab-users@reportlab.com 
>>http://two.pairlist.net/mailman/listinfo/repor> tlab-users
>>
>_______________________________________________
>reportlab-users mailing list
>reportlab-users@reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
>


--------------060006020402020104010206
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
Even if you fix this I don't recommend you use modpython for this.<br>
<br>
The problem is that the reportlab packages are designed to work<br>
primarily in transient processes, and they may (probably will) cause<br>
memory leaks in apache if you use mod apache. &nbsp;Of course, since<br>
the apache processes commit suicide every so often maybe you<br>
don't have to worry about it (I don't know enough about it).<br>
<br>
Another problem may be that the<br>
reportlab modules are not thread safe, but that is only a problem if<br>
modpython uses threading.<br>
<br>
Use a cgi script instead, maybe? (or launch a subprocess in<br>
some other manner?) &nbsp;I don't think you'll see too much of<br>
a performance difference.<br>
<br>
&nbsp; &nbsp;-- Aaron Watters<br>
<br>
Z&uacute;ber Martin wrote:<br>
<blockquote type="cite" cite="mid:4AAFE176BC1364458CF2FAF34A8AA97F0ED642@kvaw01.pvt.cz">
  <pre wrap="">Hello,<br><br>I have 'dir'ed the reportlab.pdfgen.canvas module - it seems that there are all attributes and objects, except Canvas.<br><br>Martin<br><br></pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----<br>From: Andy Robinson [<a class="moz-txt-link-freetext" href="mailto:andy@reportlab.com">mailto:andy@reportlab.com</a>] <br>Sent: Wednesday, December 04, 2002 1:08 PM<br>To: <a class="moz-txt-link-abbreviated" href="mailto:reportlab-users@reportlab.com">reportlab-users@reportlab.com</a><br>Subject: RE: [reportlab-users] Apache vs. <br>reportlab.pdfgen.canvas.Canvas object<br><br><br></pre>
    <blockquote type="cite">
      <pre wrap="">def handler(req):<br>	...<br>	c = reportlab.pdfgen.canvas.Canvas("/some/file.pdf")<br>	...<br></pre>
      </blockquote>
      <pre wrap="">No ideas myself.<br><br>Does mod_python do any lazy caching of Python modules?<br>Try making it to 'dir' on the object reportlab.pdfgen.canvas <br>and display some of its attibutes in HTML.<br><br>Thanks,<br><br>Andy<br>_______________________________________________<br>reportlab-users mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:reportlab-users@reportlab.com">reportlab-users@reportlab.com</a> <br><a class="moz-txt-link-freetext" href="http://two.pairlist.net/mailman/listinfo/repor">http://two.pairlist.net/mailman/listinfo/repor</a>&gt; tlab-users<br><br></pre>
      </blockquote>
      <pre wrap=""><!---->_______________________________________________<br>reportlab-users mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:reportlab-users@reportlab.com">reportlab-users@reportlab.com</a><br><a class="moz-txt-link-freetext" href="http://two.pairlist.net/mailman/listinfo/reportlab-users">http://two.pairlist.net/mailman/listinfo/reportlab-users</a><br><br></pre>
      </blockquote>
      <br>
      </body>
      </html>

--------------060006020402020104010206--