Closed
Bug 914766
Opened 12 years ago
Closed 7 years ago
[Contacts API] better debug function for the contacts API
Categories
(Core Graveyard :: DOM: Contacts, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: julienw, Unassigned)
Details
Attachments
(1 file)
|
57.80 KB,
patch
|
gwagner
:
review-
|
Details | Diff | Splinter Review |
In this bug, I'd like to do 2 things:
* investigate if we can basically revert bug 784746, but using a more clever debug function, where we don't concatenate strings before calling the function
* make the debug output depends on a pref
I have a patch with a try at https://tbpl.mozilla.org/?tree=Try&rev=66e1fd0a2de7
I'll test if we see a slowdown because of this.
| Reporter | ||
Comment 1•12 years ago
|
||
Here are the timings, so there is a regression (with 500 :
without patch, debug is false: 1148ms
without patch, debug is true: 1234ms
with patch, debug is false: 1229ms
with patch, debug is true: 1350ms
If that's not acceptable, I can either put back all "if (DEBUG)" statements or find the ones that are especially slow (for example the ones that get a length, or are in a loop)
Attachment #802534 -
Flags: review?(anygregor)
Comment 2•12 years ago
|
||
Comment on attachment 802534 [details] [diff] [review]
patch v1
Review of attachment 802534 [details] [diff] [review]:
-----------------------------------------------------------------
A ~7% regression for some syntactic sugar is not ok with me.
I come from research where we publish papers if we find a 0.5% speedup for a certain benchmark :)
Attachment #802534 -
Flags: review?(anygregor) → review-
| Reporter | ||
Comment 3•12 years ago
|
||
got it :)
I'll try to find the biggest culprits and otherwise just keep the debug configuration using the pref :)
thanks !
| Reporter | ||
Comment 4•12 years ago
|
||
I tried again to measure and actually the time without the patch is not consistently so low.
Here are the 8 runs I did :
without patch, debug is false: 1203, 1167, 1353, 1098, 1251, 1123, 1225, 1257 => average 1209
with patch, debug is false: 1231, 1149, 1222, 1326, 1131, 1135, 1267, 1151 => average 1201
I think that if we regress in debug mode this is not a big deal.
| Reporter | ||
Comment 5•12 years ago
|
||
Will wait for the WebIDL landing before moving forward here, because this will conflict.
Updated•12 years ago
|
Component: DOM: Device Interfaces → DOM: Contacts
| Reporter | ||
Updated•7 years ago
|
Assignee: felash → nobody
Comment 6•7 years ago
|
||
DOM: Contacts isn't used anymore.
Closing all remaining bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•