Optimise the no-op post-commit hook in the web edit case by skipping loading plugins...
[ikiwiki.git] / ikiwiki.in
index 4f24cfc2eb8ae4c53d7c0f471fbf12aea13c0578..fd21b49112527343c6f63e9eae88f7506a9eb134 100755 (executable)
@@ -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();
        }