Skip to content
  • Heiko Schocher's avatar
    common, env: optimize boottime · 1b610271
    Heiko Schocher authored
    
    
    when creating the hashtable, for each environmentvariable
    getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called,
    which costs at this point a lot of time. So call this two
    getenv() calls only once.
    
    Boottime on the ids8313 board without this patch:
    
    2013-12-19 13:38:22,894:  NAND:  128 MiB
    2013-12-19 13:38:27,659:  In:    serial
    (~4.8 sec)
    
    Bootime with this patch on the ids8313 board:
    
    2013-12-19 13:40:25,332:  NAND:  128 MiB
    2013-12-19 13:40:25,546:  In:    serial
    (~0.2 sec)
    
    Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
    Cc: Tom Rini <trini@ti.com>
    Cc: Joe Hershberger <joe.hershberger@ni.com>
    Cc: Wolfgang Denk <wd@denx.de>
    1b610271