SmokeyB has asked for the wisdom of the Perl Monks concerning the following question:

I have been developing some perls scripts on a P1 133 linux machine with 64 megs of RAM. The application runs fine and at a good speed (pages will load in less than 3 seconds). The problem occurs when I move the code over to and embedded linux box (with the same stats), it suddenly takes close to 30 seconds to load each page.

Is this a problem related to embedded linux? Are there any opimizations I could do to speed up the loading of the modules? To be quite honest, I experience in this paticular case is pretty low, so and help at all would be great.

Cheers,
Bryan

Replies are listed 'Best First'.
Re: Embedded linux loading modules slowly.
by hardburn (Abbot) on Dec 10, 2003 at 18:39 UTC

    How do you know that it's the module loading that is taking so long? Have you profiled your program on the embedded machine?

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      That's definately a good idea, but I can't profile my program on the embedded machine because it doesn't have a profile module installed (Devel::Profile) and I am unable to install it on the box. (company policies, it's pretty much a pain in the a$$)

      Basically, the way I figured it out was by writing a few test scripts and adding features to it to see when the slow down occurs. From there I narrowed it down to when I try using a module.
        From there I narrowed it down to when I try using a module.

        Any module? Have you tried it with a very short and simple plain-Perl module? How about requiring a simple .pl file? Or is it only the more complicated modules (which might have locally-compiled binary components)? That kind of information might help further diagnose the problem...