From kde-bugs-dist Sat Mar 31 22:35:45 2012 From: David Jarvie Date: Sat, 31 Mar 2012 22:35:45 +0000 To: kde-bugs-dist Subject: [Bug 281360] 4.7.1: file picker hangs reading localtime over and over Message-Id: X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=133323343215085 https://bugs.kde.org/show_bug.cgi?id=281360 David Jarvie changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Assignee|kdelibs-bugs@kde.org |djarvie@kde.org Ever confirmed|0 |1 --- Comment #7 from David Jarvie --- KSystemTimeZone functions use libc functions to obtain time zone data. If data is required for a time zone which is not the current system time zone, it's necessary to call tzset() first to specify the time zone to use, and then tzset() again on exit to restore the current system time zone. It seems that tzset() reads the time zone definition file each time it's called. So for each offsetAtZoneTime() call, time zone files are read twice. In the case of multiple successive calls for data from the same time zone, there will be many reads of the same time zone file, which is plainly very time consuming and wasteful. To fix this, I think KSystemTimeZone needs to use KTzfileTimeZone instead of using libc functions. This should make it possible to only read each time zone file a single time. I'll look at implementing this. -- You are receiving this mail because: You are watching all bug changes.