<?xml version="1.0" encoding="windows-1252"?>
<node id="593524" title="Re^3: Minimizing PAR performance hit" created="2007-01-08 07:35:55" updated="2007-01-08 02:35:55">
<type id="11">
note</type>
<author id="287302">
tsee</author>
<data>
<field name="doctext">
&lt;p&gt;Wow, 6MB is quite a shared object!&lt;/p&gt;
&lt;p&gt;By the way, what do you mean by "cannot be shared"? Can't be shared in the concept of shared memory? Does that work if the instances run in separate perl's? If so, I wonder why this doesn't happen if you run the same par'd binary twice because the cache area should be the same. Does it, perhaps, help to put Math::Pari into a separate .par and using that? Try fiddling with the &lt;i&gt;$ENV{PAR_GLOBAL_TEMP}&lt;/i&gt; variable to force sharing of the cache directory. And please forgive me for hand-waving. :)&lt;/p&gt;
&lt;p&gt;On a related note: If you download the PAR-0.970.tar.gz distribution and look for the &lt;i&gt;pare&lt;/i&gt; utility in the &lt;i&gt;contrib/&lt;/i&gt; subdirectory, you'll find a tool to remove all common modules from one executable and make it depend on the other. I'm not sure it works for the dependency on a .par. But perhaps pp -X foo.par works by skipping the stuff in foo.par during packaging!&lt;/p&gt;
&lt;p&gt;If you plan to deploy Math::Pari to the target system(s), you can use a .par as well - if you like. Here, I would advise a slightly different process:
&lt;ul&gt;
&lt;li&gt;use [cpan://PAR::Dist::FromCPAN]'s &lt;i&gt;cpan2par&lt;/i&gt; tool to create a &lt;i&gt;Math-Pari-VERSION-PLATFORM-PERLVERSION.par&lt;/i&gt; binary from Math::Pari&lt;/li&gt;
&lt;li&gt;Ship that to the clients&lt;/li&gt;
&lt;li&gt;Have them install that binary with &lt;code&gt;perl -MPAR::Dist -einstall_par&lt;/code&gt; (assuming only one .par in the current directory. See [cpan://PAR::Dist].)&lt;/li&gt;
&lt;/ul&gt;
You can even embed PAR::Dist into a simple "install_par.pl" script since it's pure-perl without non-core dependencies.
&lt;/p&gt;
&lt;p&gt;About your suggestion for the FAQ: Would you mind editing the wiki yourself? Just modify the existing answer or, if you like, create a new Q/A pair. Thanks!&lt;/p&gt;
&lt;p&gt;Steffen&lt;/p&gt;</field>
<field name="root_node">
593384</field>
<field name="parent_node">
593514</field>
</data>
</node>
