Skip to content

SHORT_HOST variable appears unused and adds latency during startup #733

@PinkD

Description

@PinkD

While profiling my bash startup time, I notice this command takes about 0.05s

time scutil --get ComputerName
<my hostname here>

real	0m0.048s
user	0m0.024s
sys	0m0.020s

And it's used to get SHORT_HOST on macos. I searched the codebase and found it's never used. Maybe we can remove it to improve the startup time?

SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*}

BTW, another time consuming op is tput which can be disabled by OMB_TERM_USE_TPUT="no"

ref: #668

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions