Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 763873 - avoid repeatedly accessing aRanges.Length() within ComputeRanges
: avoid repeatedly accessing aRanges.Length() within ComputeRanges
Product: Core
Classification: Components
Component: Graphics: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Jonathan Kew (:jfkthame)
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2012-06-12 03:34 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-06-26 09:24 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

minor optimization (4.37 KB, patch)
2012-06-12 03:34 PDT, Jonathan Kew (:jfkthame)
jd.bugzilla: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2012-06-12 03:34:58 PDT
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.
Comment 2 Ed Morley [:emorley] 2012-06-26 09:24:45 PDT

Note You need to log in before you can comment on or make changes to this bug.