This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: advise on future of glibc (mktime issue)


On Tue, 07 Jun 2005, Jairo stated:
> Now, the kernel keeps track of the time and the current timezone, why

The kernel does not know the current timezone.

In any case, since you're calling mktime() so much, /etc/localtime will
be in cache: so you're comparing the cost of a kernel ring transition
and file lookup with the hypothetical cost of a kernel ring transition
and timezone lookup. Even given the open()/close() overhead, I can't
believe you'd gain that much.


Possibly an improvement is to track the time_t at which the timezone was
last checked, and throttle the rate of rechecks to one per minute or
something like that. I don't think millions of checks per second are of
any real use to anyone.

Am I missing something? If not, I'll whip up a patch that does that
(against HEAD, as this is unlikely to be suitable for the stable branch:
I can roll one against 2.3.5 anyway, if Jairo wants).

-- 
`It's as bizarre an intrusion as, I don't know, the hobbits coming home
 to find that the Shire has been taken over by gangsta rappers.'


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]