in reply to Re^2: Slow startup on raspberry pi
in thread Slow startup on raspberry pi
I
there is special consideration on 'use threads;' - start these as early as possible, and yet http://perlmonks.org/?node_id=288022: they are not lightweight, (although some people argue and have different opinion)
All in all, is this 'use threads;' really a necessity in your script?
Starting several scripts in parallel could better do the job, IMO.
II
I do have a real advise on how to divide startup time of your use ...; lines by factor of 4,
Those 'use'-d modules are loaded on the fly by 'use' statement and their blabla.so.x object loaded.
Just build these modules statically, and you're done!
I have tried this approach on windows only (on linux I only used standard perl and my own ordinary builds at /opt/...)
On windows, I successfully statically linked perl modules statically into perl executable, fortunately the Win32 makefile allows to do so.
If startup time is still slow after that, then rip out the Autoloader, so this will avoid usage of a large amount of tiny files, instead most will be loaded quickly.
Also there is another boost option, I'll let you know on that if needed, ...
PS. in earlier days, when perl run just fine on 486, it was small and quick, and the problem of slow startup was not on the table.
:)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Slow startup on raspberry pi
by vivat (Initiate) on Jan 17, 2015 at 17:20 UTC | |
by soonix (Canon) on Jan 17, 2015 at 21:26 UTC | |
by vkon (Curate) on Jan 18, 2015 at 11:17 UTC | |
by LanX (Saint) on Jan 18, 2015 at 15:05 UTC |