>
> I'm using Netscape Composer4 and Embperl 1.2b9 on an 'at least
> medium'-scale
> web application. Many of my Embperl scripts are over 1000 lines in text. I
> found my computer slows down significantly when a httpd happens
> to be forked
> for the same session. (Apache's odd?!) I know the new forked Embperl is
> compiling my scripts again (for the new forked httpd).
>
> It was suggested that I should preload my scripts all at once in server
> startup script, eg startup.pl. But then i found several 'fat'
> httpds are there
> occupying tens of Mbytes, all carrying several compiled scripts
> that possibly
> will not be executed but eat up system memory. So this is not an
> economical
> approach, i think.
>

But a lot of that memory is shared between the childs, so it may be not so
uneconomicaly as it looks for the first view...

> Isn't it possible to cache compiled Embperl code in disk files and avoid
> reload source script to recompile everytime a httpd is forked?
> just like the
> way how Visual Studio handles .cpp and .obj interdependency.
>

Perl itself has no way to store compiled code to disk. I think the Perl
Compiler (the B:: Package) could do such things, but it would be a lot of
work to really do that.

Unless anybody likes to step in and send me a patch, I guess you have to
wait for Embperl 1.4 or 1.5 before I will implement this. Also the current
version of the Perl compiler is still experimental...

But anyway it's a good idea. I keep it in mind.

> BTW. Is there any way to avoid unwanted <BR> been generated by
> Composer? Now
> I'm using this method:
>
> [+ $output1+][#
> #][- code... -][#
> #][+$output2+][#
> #][- code... -][#
> #][+$output3+][#
> #]...
>
> to output $output1, $output2, and $output3 concatenated on one
> line. But this
> will put many [####] stuff in my script and lengthen the compile time. Is
> there any better way to achieve same purpose?
>
Simply write

[+ $output1+][-
 code...
-][+$output2+]

Embperl will remove the <BR>'s from the code for you. (You should not set
optRawInput, which is off by default)

Gerald


---------------------------------------------------------------
Gerald Richter      ecos electronic communication services gmbh
Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl

E-Mail:     [EMAIL PROTECTED]         Tel:        +49-6133/925151
WWW:        http://www.ecos.de      Fax:        +49-6133/925152
---------------------------------------------------------------

Reply via email to