Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: Slow startup on raspberry pi

by hardburn (Abbot)
on Jan 16, 2015 at 21:11 UTC ( #1113550=note: print w/replies, xml ) Need Help??

in reply to Re^2: Slow startup on raspberry pi
in thread Slow startup on raspberry pi

First thing you should look at on the Rpi is having a good power supply. Cheap old cellphone chargers won't cut it. I've had good success with the Canakit adapter. Since your program is I/O limited, finding a quality SD card is the second thing you should look at. Afraid I'm not as much help for this, but I usually buy Class 10 cards and get along OK.

Looking at your list of modules, you should get rid of threads and threads::shared, preferably rewriting those pieces with fork(), or perhaps AnyEvent. A threaded perl build is noticeably slower than a non-threaded perl, and exists mainly to do pretend fork()s on Windows.

(As an aside, I just noticed that the default Raspbian perl5.14.2 is compiled with threads. I'm not sure, but hiveberry may come with a perl without threads.)

You can also ditch Switch and rewrite those parts as an if/elsif series, or perhaps given/when if you're feeling adventurous:

Just doing those, I think you'll be able to chew off a few seconds at startup time.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1113550]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2019-09-22 12:14 GMT
Find Nodes?
    Voting Booth?
    The room is dark, and your next move is ...

    Results (273 votes). Check out past polls.