Closed
Bug 204005
Opened 22 years ago
Closed 21 years ago
optimize caret timer usage
Categories
(Core :: DOM: Selection, defect)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
People
(Reporter: leon.zhang, Assigned: mjudge)
References
(Blocks 2 open bugs)
Details
(Keywords: perf)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
sfraser_bugs
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•22 years ago
|
Reporter | ||
Comment 1•22 years ago
|
||
In caret process, timer always be created in PrimeTimer each time, to enhance
perf, we can reInit it and not create each time
Reporter | ||
Comment 2•22 years ago
|
||
Reporter | ||
Comment 3•22 years ago
|
||
Comment 4•22 years ago
|
||
Comment on attachment 122165 [details] [diff] [review]
a new patch
I think StopBlinking should kill the timer.
Attachment #122165 -
Flags: review-
Comment 5•22 years ago
|
||
The first patch looks good to me.
Comment 6•22 years ago
|
||
Oh, and the first patch seems OK on Mac OS X too.
Comment 7•22 years ago
|
||
pav, is re-initing repeating timers supported? If so, could we document that
clearly in nsITimer.idl?
Comment 8•22 years ago
|
||
I remember a very serious problem in the 1.3a and 1.3b builds on Mac OS X, with
timers that got re-inited : see bug 184363. The timer was the one used to show
tooltips for title-tags. We had to back out that change, which was a shame,
because it was a good performance speedup on pages with lots of title-tags on
their links. The problem was probably that we were firing and re-initing timers
in a very fast pace, which might have cuased multithreading problems.
Are you sure that it's safe to re-init timers ?
Comment 9•22 years ago
|
||
I was aware of that tooltip timer issue, which is why I tested the patch here on
OS X.
If we declare that it's safe to re-init timers, I'd like to see a new 'reinit'
method added to nsITimer, to make it clear to users of the API.
Updated•22 years ago
|
Attachment #122163 -
Flags: review+
Reporter | ||
Updated•22 years ago
|
Attachment #122163 -
Flags: superreview?(bz-bugspam)
Reporter | ||
Comment 10•22 years ago
|
||
Comment on attachment 122163 [details] [diff] [review]
proposed fix
bz, can give sr?
Comment 11•22 years ago
|
||
I will not be able to sr this in the near future, since I haven't convinced
myself that it's safe to reinit the timer, and I do not have the time to read
the bugs and code necessary to do that.
"Near future" here is probably "until June 14".
Reporter | ||
Comment 12•22 years ago
|
||
According to comments and patches of bug 181961,it seems that timer can be
ReInited in current trunk.
Reporter | ||
Updated•22 years ago
|
Attachment #122165 -
Attachment is obsolete: true
Reporter | ||
Updated•22 years ago
|
Attachment #122163 -
Flags: superreview?(bz-bugspam) → superreview?(brendan)
Comment 13•21 years ago
|
||
Comment on attachment 122163 [details] [diff] [review]
proposed fix
bz, I can sr this, but then I'm the one that made timer re-init work. If
someone has doubts, please raise them with reference to specific code.
I don't think this should go into 1.4final.
I'm not planning to add a bunch of reinit methods to nsITimer, but I did add
comments when I was there last to say that re-init works, and that it can be
preferable to re-init, to save the overhead of destroying and recreating a
timer.
/be
Attachment #122163 -
Flags: superreview?(brendan) → superreview+
Comment 14•21 years ago
|
||
fwiw, while experimenting with this, we did see odd results when reinitting
precise timers; making the timer a slack timer allows reinit to work OK.
Reporter | ||
Comment 15•21 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•