Sorry, I didn't mean to insult you (or anyone) with my C++ comment. I don't know Perl at all (as illustrated in my code example) so C++ is guaranteed to be faster for me. Plus I have good C++ tools (VS.NET) and no real Perl tools (again, editing scripts using VS.NET).

Fortunately, despite my dismal Perl code example, you understood my question. I can deal with the answer - thanks once again.

Ideally what I would like to do is prevent running the SA startup/initialisation code more than once (or so). This stuff takes quite a while to crank up and will kill performance. If I can't share a single instance, can I somehow "clone" a pre-initialised instance? (Last question, I promise, at least until I get to do some experimentation tonight).

If I can't clone the object I'll definitely have to have a pool of interpreters lying around. I'm not overly concerned by the memory consumption as ActivePerl already consumes a heap of memory anyway, I can't imagine a few more instances of SpamAssassin will make that much difference.

Phil


In reply to Re: Re: Re: Re: Re: Re: Externally managed threads using embedded Perl by Anonymous Monk
in thread Externally managed threads using embedded Perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.