in reply to Re: Re: Embedded linux loading modules slowly.
in thread Embedded linux loading modules slowly.

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...

  • Comment on Re: Re: Re: Embedded linux loading modules slowly.

Replies are listed 'Best First'.
Re: Re: Re: Re: Embedded linux loading modules slowly.
by SmokeyB (Scribe) on Dec 10, 2003 at 21:16 UTC
    Actually, it is just any module. I made one with 3 simple functions that do some basic math calculations. It still took as long as a more complicated module.

    I then tested my .pl file by writing those functions in the script itself, without using the module, and the page came up more or less instantly.

    As you can see, I'm quite stumped.
      Very interesting - The first question which comes to my mind at this point is about the storage device employed for the embedded system. What are the characteristics of this device? Are the speed issues which you are experiencing related to access to this device, either at a interface or physical level?

      Another approach may be to consider incorporating the module code directly into your Perl script.

       

      perl -le "print+unpack'N',pack'B32','00000000000000000000001010011100'"

        Thanks for your input everyone, but due to other restrictions and other factors, the embedded system is gonna be upgraded to something more powerful, so this may no longer be a problem. Until I get my hands on the box, I won't know, but again, thanks for your help!

        Cheers!
      Could you try also loading an external file with "require" as opposed to "use", to confirm that the problem is with loading the module from disk rather than with importing it?