This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6612] New: strftime() calls tzset() unnecessarily
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Jun 2008 19:27:47 -0000
- Subject: [Bug libc/6612] New: strftime() calls tzset() unnecessarily
- Reply-to: sourceware-bugzilla at sourceware dot org
strftime() calls tzset() unnecessarily even if no timezone information is
required. Since tzset() involves at least single stat('/etc/localtime') syscall,
that can be significant overhead for applications that call strftime() very
frequently (e.g. gbookmark GLib component, see
http://bugzilla.gnome.org/show_bug.cgi?id=535223#c4). Attached patch makes
strftime() call tzset() only when actually necessary.
It might be preferrable to ratelimit tzset() stat() calls, to say single call
per few seconds - there's no sense in checking for timezone change thousands of
times per second.
--
Summary: strftime() calls tzset() unnecessarily
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: pasky at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=6612
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.