On Wed, 2023-01-18 at 20:48 -0500, Joshua Kinard wrote:
> 
> So is adding a default definition of TZ to our base system
> /etc/profile something we want to look at?  I 
> haven't tried any other methods of benchmarking to see if not making
> those additional syscalls is just placebo 
> or if there are actual impacts.  Given how long this oddity has been
> around, I can't tell if it's a genuine 
> bug in glibc, an unoptimized corner case, or just a big
> nothingburger.
> 

I thought about doing this on my laptop, and talked myself out of it.
The main counter-arguments are,

  1. ICU doesn't handle the :/etc/localtime format at the moment,

       * https://unicode-org.atlassian.net/browse/ICU-13694
       * https://github.com/nodejs/node/issues/37271

     You could readlink() it or whatever at boot, but that will cause
     changes to /etc/localtime to be mysteriously ignored.

  2. The stats are there for a "good" reason, namely to let glibc
     know if the timezone has changed on the fly.

The first one is only a temporary deal-breaker, but the second is a
tradeoff involving how often your timezone changes (user-dependent) and
what the real performance impact is (probably not much).


Reply via email to