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

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.
  • Comment on Re: Re: Embedded linux loading modules slowly.

Replies are listed 'Best First'.
Re: Re: Re: Embedded linux loading modules slowly.
by simonm (Vicar) on Dec 10, 2003 at 19:54 UTC
    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...

      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'"

        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?