Today I learned how to profile Zsh in case of performance issues. To do that we should surround the content of .zshrc with the following:

zmodload zsh/zprof

# Content of .zshrc

zprof