diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-10-23 14:08:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-10-23 14:08:45 -0400 |
commit | 8821ba3a590ac25299f17c164f7d0755c5ea97e4 (patch) | |
tree | 9e1ea7cea3f5ff47129bf401533f6cff4f97afad /ikiwiki.in | |
parent | 534f7144782ba6a453d5befed4faa7d6657d5fdc (diff) | |
download | ikiwiki-8821ba3a590ac25299f17c164f7d0755c5ea97e4.tar ikiwiki-8821ba3a590ac25299f17c164f7d0755c5ea97e4.tar.gz |
Optimise the no-op post-commit hook in the web edit case by skipping loading plugins. (Particularly a win when using external plugins.)
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-x | ikiwiki.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ikiwiki.in b/ikiwiki.in index 4f24cfc2e..fd21b4911 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -118,6 +118,12 @@ sub getconfig () { #{{{ error("WRAPPED_OPTIONS: $@"); } delete $ENV{WRAPPED_OPTIONS}; + + # optimisation for no-op post_commit + if ($config{post_commit} && ! commit_hook_enabled()) { + exit 0; + } + loadplugins(); checkconfig(); } |