Closed
Bug 1152836
Opened 11 years ago
Closed 11 years ago
WiFi auth scanner is slow
Categories
(Firefox OS Graveyard :: Developer Tools, defect)
Firefox OS Graveyard
Developer Tools
Tracking
(firefox40 fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
References
(Blocks 1 open bug)
Details
Attachments
(7 files, 1 obsolete file)
|
MozReview Request: Bug 1152836 - QR Decoder: Remove QR namespace (image, h/w): 750ms -> 580ms r=past
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
past
:
review+
|
Details |
At the moment, the QR recognition cycle is extremely long on devices.
On the Flame, it takes roughly 20s to recognize an image.
The current code is not optimized at all. I have several patches that will bring this down to the 1.5s range.
| Assignee | ||
Comment 1•11 years ago
|
||
/r/6815 - Bug 1152836 - QR Decoder: Cache imagedata.data: 915ms -> 750ms r=past
/r/6817 - Bug 1152836 - QR Decoder: Remove QR namespace (image, h/w): 750ms -> 580ms r=past
/r/6819 - Bug 1152836 - QR Decoder: Let everywhere, style nits: 580ms -> 400ms r=past
/r/6821 - Bug 1152836 - QR Decoder: Remove getPixel bounds check: 400ms -> 335ms r=past
/r/6823 - Bug 1152836 - QR Decoder: Add 32bit buffer: 335ms -> 256ms r=past
/r/6825 - Bug 1152836 - QR Decoder: Grayscale clamped array: 256ms -> 235ms r=past
/r/6827 - Bug 1152836 - QR Decoder: Inline getPixel: 235ms -> 225ms r=past
Pull down these commits:
hg pull -r 2c0d3ca7200fba5b3ec46a8f6c31d5c4b5a20fdf https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590552 -
Flags: review?(past)
| Assignee | ||
Comment 2•11 years ago
|
||
Panos, here a bunch of micro-optimizations for the QR decoder library we used on devices.
On desktop, everything added together brings about 4x improvement (915ms -> 225ms).
On the Flame, it's more like 13x improvement (20000ms -> 1500ms), which make the scanner much more usable!
While toiling in the library, I've seen several other possible optimizations, but these seem like enough to worry about for now.
| Assignee | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
https://reviewboard.mozilla.org/r/6819/#review5731
Ship It!
::: toolkit/devtools/qrcode/decoder/index.js
(Diff revision 1)
> - return this.errorCorrectionLevel.ordinal() << 3 | dataMask;
> + return this.errorCorrectionLevel.ordinal() << 3 | this.dataMask;
Whoa!
::: toolkit/devtools/qrcode/decoder/index.js
(Diff revision 1)
> - var eval = poly.evaluateAt(this.field.exp(dataMatrix ? i + 1 : i));
> - syndromeCoefficients[syndromeCoefficients.length - 1 - i] = eval;
> - if (eval != 0) {
> + let value = poly.evaluateAt(this.field.exp(dataMatrix ? i + 1 : i));
> + syndromeCoefficients[syndromeCoefficients.length - 1 - i] = value;
> + if (value !== 0) {
Geez!
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Comment on attachment 8590552 [details]
MozReview Request: bz://1152836/jryans
https://reviewboard.mozilla.org/r/6813/#review5741
Nice! I take it we don't expect to pick up changes from upstream very often, right?
Attachment #8590552 -
Flags: review?(past) → review+
| Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Panos Astithas [:past] from comment #11)
> Comment on attachment 8590552 [details]
> MozReview Request: bz://1152836/jryans
>
> https://reviewboard.mozilla.org/r/6813/#review5741
>
> Nice! I take it we don't expect to pick up changes from upstream very often,
> right?
No, the last change was 2014-01-09 (~15 months ago). It's basically a port of Java code from even longer ago, I think.
So, anyway, I think we are fine to diverge as needed.
| Assignee | ||
Comment 13•11 years ago
|
||
remote: https://hg.mozilla.org/integration/fx-team/rev/b71c0a6ffa5e
remote: https://hg.mozilla.org/integration/fx-team/rev/6e9cea30c62d
remote: https://hg.mozilla.org/integration/fx-team/rev/169c46b4e35e
remote: https://hg.mozilla.org/integration/fx-team/rev/f08b4a38f895
remote: https://hg.mozilla.org/integration/fx-team/rev/d231cf0ff16a
remote: https://hg.mozilla.org/integration/fx-team/rev/dd707db723cf
remote: https://hg.mozilla.org/integration/fx-team/rev/61a64147f504
Status: NEW → ASSIGNED
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jryans
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b71c0a6ffa5e
https://hg.mozilla.org/mozilla-central/rev/6e9cea30c62d
https://hg.mozilla.org/mozilla-central/rev/169c46b4e35e
https://hg.mozilla.org/mozilla-central/rev/f08b4a38f895
https://hg.mozilla.org/mozilla-central/rev/d231cf0ff16a
https://hg.mozilla.org/mozilla-central/rev/dd707db723cf
https://hg.mozilla.org/mozilla-central/rev/61a64147f504
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
| Assignee | ||
Comment 15•10 years ago
|
||
Attachment #8590552 -
Attachment is obsolete: true
Attachment #8620000 -
Flags: review+
Attachment #8620001 -
Flags: review+
Attachment #8620002 -
Flags: review+
Attachment #8620003 -
Flags: review+
Attachment #8620004 -
Flags: review+
Attachment #8620005 -
Flags: review+
Attachment #8620006 -
Flags: review+
| Assignee | ||
Comment 16•10 years ago
|
||
| Assignee | ||
Comment 17•10 years ago
|
||
| Assignee | ||
Comment 18•10 years ago
|
||
| Assignee | ||
Comment 19•10 years ago
|
||
| Assignee | ||
Comment 20•10 years ago
|
||
| Assignee | ||
Comment 21•10 years ago
|
||
| Assignee | ||
Comment 22•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•