Closed Bug 963863 Opened 11 years ago Closed 4 years ago

Specify data structure's initialCapacity where applicable

Categories

(Firefox for Android Graveyard :: General, defect, P5)

All
Android
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mcomella, Unassigned)

References

Details

(Keywords: perf)

The gains from this are perhaps minimal and not worthwhile to implement, but I believe the Java libraries generally double the underlying data structure sizes when the wrapping data structure needs additional space, which is a terrible choice when you're dealing with an already large data structure that isn't likely to grow much further. Example, though not likely of neglible perfomance, [1] pulls out our Top Sites thumbnails (I believe) which means the HashMap should be of size 6 (assuming the DB query only returns 6 thumbnails). This bug probably applies to several data structures, including various Map and List implementations. [1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/TopSitesPanel.java?rev=0e7f583a8f1a#780
Keywords: perf
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.