Closed
Bug 1130317
Opened 10 years ago
Closed 10 years ago
[UserDictionary] Pre-determine dict blob total byte length before building the blob
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.2 S6 (20feb)
People
(Reporter: mnjul, Assigned: mnjul)
References
Details
(Whiteboard: [p=1])
Attachments
(1 file)
In bug 1102834's user dictionary blob generation, the blob array grows dynamically as each byte is push()'ed into the array, which is later converted to a typed array. However, it should be possible that we pre-determine the length of the blob array and allocate a typed array of specific size and fill in the bytes directly on the typed array. We should investigate the possibility.
Assignee | ||
Comment 1•10 years ago
|
||
* For better performance, for sure.
Assignee | ||
Comment 2•10 years ago
|
||
On this. Target Milestone is set to S7 because S6's end-date is Chinese New Year.
Assignee: nobody → jlu
Target Milestone: --- → 2.2 S7 (6mar)
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=1]
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Will request for review after testing is good.
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to John Lu [:mnjul] [MoCoTPE] from comment #1)
> * For better performance, for sure.
A very rough JSPerf: http://jsperf.com/typed-array-push-or-predetermined
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8561210 [details] [review]
[PullReq] mnjul:bug_1130317_dict_blob_predetermine_length to mozilla-b2g:master
Tim,
Please check out the patch. The rationale behind this is pretty simple. No tests were modified as we blackbox-test WordListConverter, and its internal performance improvement patch should, of course, not have an impact on blob end-result.
Thanks!
Attachment #8561210 -
Flags: review?(timdream)
Updated•10 years ago
|
Attachment #8561210 -
Flags: review?(timdream) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Updated•10 years ago
|
Keywords: checkin-needed
Comment 7•10 years ago
|
||
Pull request has landed in master: https://github.com/mozilla-b2g/gaia/commit/c026f6d6b7a58fcc15a3164b37a1c9de788ce1e6
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Target Milestone: 2.2 S7 (6mar) → 2.2 S6 (20feb)
You need to log in
before you can comment on or make changes to this bug.
Description
•