Bug 15852 - date-format-xparb spends 12% of TOTAL TIME in localtime_r
Summary: date-format-xparb spends 12% of TOTAL TIME in localtime_r
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 01:28 PST by Eric Seidel (no email)
Modified: 2012-09-06 16:37 PDT (History)
4 users (show)

See Also:


Attachments
here's the old date patch I had lying around -- not sure how good it is (24.92 KB, patch)
2007-11-06 08:47 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Updated version of darin's date patch (broken, I think) (30.92 KB, patch)
2007-11-06 12:07 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
darin's patch, updated for TOT (0.5% slower on SunSpider) (30.98 KB, patch)
2007-11-06 12:19 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-06 01:28:57 PST
date-format-xparb spends 12% of TOTAL TIME in localtime_r

Holy broken date code, batman!

Darin mentioned that he had a rewrite of some of the date code sitting in a patch on his machine at one point in time.  Perhaps that also included a fix for this.

I'm sure there is a simpler (& faster) way to do getDSTOffset()
Comment 1 Darin Adler 2007-11-06 08:47:13 PST
Created attachment 17060 [details]
here's the old date patch I had lying around -- not sure how good it is
Comment 2 Eric Seidel (no email) 2007-11-06 12:07:12 PST
Created attachment 17063 [details]
Updated version of darin's date patch (broken, I think)

I think the patch somehow broke (hangs) after updating it to TOT.  I've not investigated yet.
Comment 3 Eric Seidel (no email) 2007-11-06 12:19:56 PST
Created attachment 17064 [details]
darin's patch, updated for TOT (0.5% slower on SunSpider)
Comment 4 Eric Seidel (no email) 2007-11-19 06:05:57 PST
localtime_r has made it's way all the way to .6% of *total time*.  KJS::getDSTOffset(double) is 1.1% of total time on my machine.
Comment 5 Eric Seidel (no email) 2007-11-19 06:06:17 PST
Those numbers are for a --shark20 sample across all tests.
Comment 6 Alexey Proskuryakov 2009-03-24 10:57:05 PDT
Eric, is this bug still valid?
Comment 7 Eric Seidel (no email) 2009-03-24 11:30:58 PDT
Unless someone has re-written the date code, we are likely still spending too much time here, yes.
Comment 8 Gavin Barraclough 2012-09-06 16:37:36 PDT
The date code has been rewritten;  date-format-xparb does not call localtime_r.