tide
tide copied to clipboard
`source` code instead of running it in functions
Since we're creating a background shell each time, loading the functions into memory is just wasted time. Instead we should source
files in the background process.
What does this actually do?
@SweepingBishops When you have a function defined in your functions
directory, that function is lazily loaded only when actually run the command. This means that the first run of a function has a slight overhead. Since we create a new Fish shell every time, we are always paying this cost and never getting the benefit of the function being loaded into memory.
Oh, Ok. But will this create problems if you have a lot of functions? Won't the shell take a longer time to load up?
No. I'm referring to functions like tide items, which only ever run in the subshell. This would have no impact on shell startup time.