Closed Bug 465128 Opened 16 years ago Closed 16 years ago

.autoreg timestamp problems (component registration owns startup time)

Categories

(Toolkit Graveyard :: XULRunner, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1b3

People

(Reporter: pavlov, Assigned: taras.mozilla)

References

Details

(4 keywords)

Attachments

(1 file, 4 obsolete files)

http://mxr.mozilla.org/mozilla-central/source/xulrunner/app/Makefile.in#274

is causing us to package up a .autoreg as part of Fennec (via make package, deb, etc).  This causes every startup to take 35 seconds instead of 9.
Flags: blocking1.9.1?
Benjamin, is this something our packaging scripts should deal with, or is it something xulrunner's makefile should handle?

I also don't understand why this file is not getting deleted after the first run. The code in XPCOMInit doesn't seem to remove the file:
http://mxr.mozilla.org/mozilla-central/source/xpcom/build/nsXPComInit.cpp#342
Attached patch patch (obsolete) — Splinter Review
Simple patch that only creates the .autoreg file for debug builds

[Do we even need the file for debug builds?]
Assignee: nobody → mark.finkle
Attachment #348401 - Flags: review?(benjamin)
Attachment #348401 - Attachment is patch: true
Attachment #348401 - Attachment mime type: application/octet-stream → text/plain
Attached patch patch - with real tab (obsolete) — Splinter Review
same as last, but with a real tab character
Attachment #348401 - Attachment is obsolete: true
Attachment #348402 - Flags: review?(benjamin)
Attachment #348401 - Flags: review?(benjamin)
The .autoreg file should not be causing every startup to be longer. Do we know why it is? We should be comparing the .autoreg file timestamp against the component registration file timestamp and only re-registering if the .autoreg has a newer timestamp.
I know Phil was wondering about this in #developers not long ago.
Blocks: 463298, 465556
No longer blocks: 465556
Attachment #348402 - Flags: review?(benjamin)
Comment on attachment 348402 [details] [diff] [review]
patch - with real tab

Clearing review for unanswered questions.
Problem is when the device clock is screwed up. For example the N810 configures time in UTC instead local timezone causing things to startup slower than needed for 8 hours after the build.

I think we should add a time check to ignore .autoreg if the timestamp is in the future.
I also took out a bunch of stat() calls.
Assignee: mark.finkle → tglek
Attachment #351278 - Flags: review?(benjamin)
previous patch didn't check to the other timestamp comparison
Attachment #351278 - Attachment is obsolete: true
Attachment #351286 - Flags: review?(benjamin)
Attachment #351278 - Flags: review?(benjamin)
Comment on attachment 351286 [details] [diff] [review]
Ignore autoreg if timestamps are screwy(in box cases)

This looks like an acceptable approach. However, we no longer use the NSPR LL_ macros: all our targets support native long longs, so please just use regular operators (*</)
Attachment #351286 - Flags: review?(benjamin) → review-
Attachment #351286 - Attachment is obsolete: true
Attachment #351996 - Flags: review?(benjamin)
Summary: Do not package .autoreg files (component registration owns startup time) → .autoreg timestamp problems (component registration owns startup time)
Attachment #351996 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
Attachment #348402 - Attachment is obsolete: true
Comment on attachment 351996 [details] [diff] [review]
Ignore autoreg if timestamps are screwy(no more LL_*)
[Checkin: Comment 12 & 14]

http://hg.mozilla.org/mozilla-central/rev/15573888a32f
Attachment #351996 - Attachment description: Ignore autoreg if timestamps are screwy(no more LL_*) → Ignore autoreg if timestamps are screwy(no more LL_*) [Checkin: Comment 12]
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Blocks: 459117
Attachment #351996 - Flags: approval1.9.1?
Comment on attachment 351996 [details] [diff] [review]
Ignore autoreg if timestamps are screwy(no more LL_*)
[Checkin: Comment 12 & 14]

a191=beltzner
Attachment #351996 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
Comment on attachment 351996 [details] [diff] [review]
Ignore autoreg if timestamps are screwy(no more LL_*)
[Checkin: Comment 12 & 14]

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/dc33b51a4125
Attachment #351996 - Attachment description: Ignore autoreg if timestamps are screwy(no more LL_*) [Checkin: Comment 12] → Ignore autoreg if timestamps are screwy(no more LL_*) [Checkin: Comment 12 & 14]
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P3
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.