diff options
author | Björn Gustavsson <[email protected]> | 2015-04-28 08:49:08 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-05-06 10:19:06 +0200 |
commit | 7309ff4c3832588cc15565ff264db2a120e6092e (patch) | |
tree | f519a02ddab40368972681882c12e272ab05f2aa /lib/kernel/src/hipe_ext_format.hrl | |
parent | 8adbf1a5407dbb8b64070bddbea0bb364e759dd0 (diff) | |
download | otp-7309ff4c3832588cc15565ff264db2a120e6092e.tar.gz otp-7309ff4c3832588cc15565ff264db2a120e6092e.tar.bz2 otp-7309ff4c3832588cc15565ff264db2a120e6092e.zip |
code: Reduce overhead of native code checking for loaded modules
When the code server has been started, the function
load_native_code_for_all_loaded/0 will check whether the .beam
files for all loaded modules contain any native code. If there
is native code, it will be loaded.
If there is no native code, on my computer the check will take about
10 ms. That time can be reduced to about 2 ms if we replace the call
to code beam_lib:chunks/2 with a call to prim_file:read_file/1 to read
the file and a call to code:get_chunk/2 to check whether the chunk for
native code is present.
Furthermore, the entire check can be spawned off to a separate
process and done in parallel with OTP starting up.
Diffstat (limited to 'lib/kernel/src/hipe_ext_format.hrl')
0 files changed, 0 insertions, 0 deletions