Closed Bug 847838 Opened 9 years ago Closed 9 years ago

B2G RIL: Cache record size in ICC IO.

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: allstars.chh, Assigned: allstars.chh)

Details

Attachments

(3 files, 3 obsolete files)

Currently when we call ICCIOHelper.loadLinearFixedEF, it will call getResponse to get record size, but we could cache the record size to speed up IO operations.
Status: NEW → ASSIGNED
Comment on attachment 721582 [details] [diff] [review]
Part 1: add recordSize in loadLinearFixedEF.

Switch r? to Vicamo as Hsinyi is busy.
Attachment #721582 - Flags: review?(htsai) → review?(vyang)
Attachment #721583 - Flags: review?(htsai) → review?(vyang)
Attachment #721584 - Flags: review?(htsai) → review?(vyang)
Attachment #721583 - Flags: review?(vyang) → review+
Comment on attachment 721582 [details] [diff] [review]
Part 1: add recordSize in loadLinearFixedEF.

Review of attachment 721582 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/ril_worker.js
@@ +9700,5 @@
> +    }
> +
> +    options.type = EF_TYPE_LINEAR_FIXED;
> +    options.pathId = ICCFileHelper.getEFPath(options.fileId);
> +    let cb;

Please move |let cb;| to the beginning of this function.

@@ +9703,5 @@
> +    options.pathId = ICCFileHelper.getEFPath(options.fileId);
> +    let cb;
> +    if (options.recordSize) {
> +      readRecord(options);
> +    } else {

bail out early.
Attachment #721582 - Flags: review?(vyang) → review+
Comment on attachment 721584 [details] [diff] [review]
Part 3: tests case for cached record size.

Review of attachment 721584 [details] [diff] [review]:
-----------------------------------------------------------------

Nice patch!
Attachment #721584 - Flags: review?(vyang) → review+
addressed comments. add r=vicamo
Attachment #721582 - Attachment is obsolete: true
Attachment #722087 - Flags: review+
add r=vicamo
Attachment #721583 - Attachment is obsolete: true
Attachment #722088 - Flags: review+
add r=vicamo
Attachment #721584 - Attachment is obsolete: true
Attachment #722089 - Flags: review+
Try run for b9613a595e4c is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=b9613a595e4c
Results (out of 3 total builds):
    success: 3
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/yhuang@mozilla.com-b9613a595e4c
https://hg.mozilla.org/mozilla-central/rev/997c93376e85
https://hg.mozilla.org/mozilla-central/rev/c8b219f93e32
https://hg.mozilla.org/mozilla-central/rev/cdb28e023b26
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.