Skip to content

Why rc.d? #4

Answered by marlonrichert
fagci asked this question in Q&A
Dec 13, 2021 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

The overhead of sourcing a file is negligible in zsh. On my machine, there's a delay of only 0.000012 to 0.000025 seconds between the evaluation of the source or . statement and the evaluation of the first statement in the sourced file. The total overhead of all . calls in the .zshrc file here combined is only 0.000133 seconds and the evaluation of $ZDOTDIR/rc.d/<->-*.zsh(n) takes just 0.000037 seconds. I think we can live with that. 🙂

As for your question "Why rc.d?", I have two answers:

  • git is better at detecting file renames than at keeping track of blocks of code being moved inside the same file, especially if you've made other modifications, too.
  • When reading the config, it's much e…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@fagci
Comment options

@fagci
Comment options

@fagci
Comment options

@marlonrichert
Comment options

Answer selected by fagci
Comment options

You must be logged in to vote
2 replies
@marlonrichert
Comment options

@fagci
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation
2 participants