[Git-commits] [grml/grml-etc-core] f444c5: zshrc: add `NOETCHOSTS` parameter
Michael Prokop
noreply at github.com
Fri Dec 3 10:22:03 CET 2021
Branch: refs/heads/master
Home: https://github.com/grml/grml-etc-core
Commit: f444c52ee3ccb55bb312a074d38484a1b42c26c9
https://github.com/grml/grml-etc-core/commit/f444c52ee3ccb55bb312a074d38484a1b42c26c9
Author: Roman Volosatovs <rvolosatovs at riseup.net>
Date: 2021-11-13 (Sat, 13 Nov 2021)
Changed paths:
M doc/grmlzshrc.t2t
M etc/zsh/zshrc
Log Message:
-----------
zshrc: add `NOETCHOSTS` parameter
`/etc/hosts` may be used as a denylist for undesired hosts on some systems.
In such usage scenarios the file may be large in size and parsing it may severely
impact shell startup time.
For example, on a system with `/etc/hosts` from https://github.com/StevenBlack/hosts:
```
% cat profile.zsh
#!/usr/bin/env zsh
zmodload zsh/zprof
source ./etc/zsh/zshrc
zprof
```
```
% ./profile.zsh | head -3
num calls time self name
-----------------------------------------------------------------------------------
1) 1 1181.93 1181.93 87.91% 1181.14 1181.14 87.85% grmlcomp
```
```
% NOETCHOSTS=1 ./profile.zsh | head -3
num calls time self name
-----------------------------------------------------------------------------------
1) 2 79.77 39.88 47.37% 79.77 39.88 47.37% compaudit
```
Signed-off-by: Roman Volosatovs <rvolosatovs at riseup.net>
Commit: 71d9deccfa42338806229f048f75248859d100a0
https://github.com/grml/grml-etc-core/commit/71d9deccfa42338806229f048f75248859d100a0
Author: Michael Prokop <mika at grml.org>
Date: 2021-12-03 (Fri, 03 Dec 2021)
Changed paths:
M doc/grmlzshrc.t2t
M etc/zsh/zshrc
Log Message:
-----------
Merge remote-tracking branch 'origin/github/pr/130'
Compare: https://github.com/grml/grml-etc-core/compare/da239bb6fb27...71d9deccfa42
More information about the Git-commits
mailing list