diff options
author | http://www.digital-scurf.org/ <Daniel_Silverstone@web> | 2015-01-29 09:52:23 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2015-01-29 09:52:23 -0400 |
commit | fadf17320ac5934b6b3a91634a8ec6570306106b (patch) | |
tree | c07ebcc783811ba933e1e95f20da58eaa9ae3c75 | |
parent | 7eb8fdc054526e67460b064d0b3a74a8764301ad (diff) | |
download | ikiwiki-fadf17320ac5934b6b3a91634a8ec6570306106b.tar ikiwiki-fadf17320ac5934b6b3a91634a8ec6570306106b.tar.gz |
missing timezone leads to excessive stat()
-rw-r--r-- | doc/bugs/without_timezone__44___excessive_statting_causes_slowness.mdwn | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/bugs/without_timezone__44___excessive_statting_causes_slowness.mdwn b/doc/bugs/without_timezone__44___excessive_statting_causes_slowness.mdwn new file mode 100644 index 000000000..3b70e13f6 --- /dev/null +++ b/doc/bugs/without_timezone__44___excessive_statting_causes_slowness.mdwn @@ -0,0 +1,9 @@ +If the TZ environment variable is unset *and* the 'timezone' entry in setup is unset, then libc defaults to /etc/localtime which is all well and good, but it causes it to stat() that file for every strftime or similar. This results in somewhere in the region of 300k calls to stat(/etc/localtime) for my 600 page ikiwiki and introduces appreciable slowness into builds. + +If either of TZ or timezone is set, then instead it is believed and /etc/localtime is not repeatedly stat()d, even if TZ or timezone is set to ":/etc/localtime". + +A conversation with smcv on IRC suggested: + +> `it just needs "elsif (-e /etc/localtime) { $ENV{TZ} = ':/etc/localtime'; } else { $ENV{TZ} = 'GMT'; } or some such` + +relating to the processing of `$ENV{TZ}` and `$config{timezone}` in `Ikiwiki.pm` |