avoid repeatedly accessing aRanges.Length() within ComputeRanges

RESOLVED FIXED in mozilla16

Status

()

Core
Graphics: Text
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 632192 [details] [diff] [review]
minor optimization

A little micro-optimization.... it's potentially inefficient to constantly read aRanges.Length(); instead, we can keep track of the last range index in a local variable. We also don't need the initial Clear(), as ComputeRanges is always called with a freshly-constructed array.
(Assignee)

Updated

5 years ago
Attachment #632192 - Attachment is patch: true
Attachment #632192 - Flags: review?(jdaggett)

Updated

5 years ago
Attachment #632192 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 1

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/064319559cb2
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla16

Comment 2

5 years ago
https://hg.mozilla.org/mozilla-central/rev/064319559cb2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.