Skip to content

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Sep 5, 2024

Replace ArrayList with ArrayDeque so that erasing the first element does not incur O(n) cost, as when erasing the entire ArrayList this inefficiency results in O(n^2) cost. Googlers see b/364354267 and cl/671065694 for details.

Ported from firebase/firebase-ios-sdk#13572

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Release note changes

The following release notes were modified. Please ensure they look correct.

Release Notes
firebase-firestore
### {{firestore}} version 25.1.1 {: #firestore_v25-1-1}

* {{changed}} Improve efficiency of memory persistence when processing a large number of writes. GitHub [#6233](//github.com/firebase/firebase-android-sdk/issues/6233){: .external}

#### {{firestore}} Kotlin extensions version 25.1.1 {: #firestore-ktx_v25-1-1}

The Kotlin extensions library transitively includes the updated
`firebase-firestore` library. The Kotlin extensions library has no additional
updates.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 5, 2024

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Unit Test Results

   186 files  +   152     186 suites  +152   4m 47s ⏱️ + 3m 49s
1 234 tests +1 046  1 218 ✔️ +1 030  16 💤 +16  0 ±0 
2 492 runs  +2 116  2 460 ✔️ +2 084  32 💤 +32  0 ±0 

Results for commit b9784b9. ± Comparison against base commit 2eb7cd7.

This pull request removes 188 and adds 1234 tests. Note that renamed tests count towards both.
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_emptyLocationHeader_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_isNotRedirectResponse_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_missingLocationHeader_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_onAppResume_setsUpdateCancelled
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_whenAabReleaseAvailable_redirectsToPlay
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_whenOpenConnectionFails_setsNetworkFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateApp_whenCalledMultipleTimesWithAAB_onlyMakesOneRequest
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ installActivityDestroyed_setsInstallError
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ installApk_currentActivityNotNull_InstallIntentOnCurrentActivity
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ whenCalledMultipleTimes_onlyEmitsOneIntent
…
com.google.firebase.firestore.AggregateQuerySnapshotTest ‑ createWithCountShouldReturnInstanceWithTheGivenQueryAndCount
com.google.firebase.firestore.AggregateQueryTest ‑ testSourceMustNotBeNull
com.google.firebase.firestore.BlobTest ‑ testComparison
com.google.firebase.firestore.BlobTest ‑ testEquals
com.google.firebase.firestore.BlobTest ‑ testMutableBytes
com.google.firebase.firestore.CollectionReferenceTest ‑ testEquals
com.google.firebase.firestore.DocumentChangeTest ‑ randomTests
com.google.firebase.firestore.DocumentChangeTest ‑ testAdditions
com.google.firebase.firestore.DocumentChangeTest ‑ testChangesWithSortOrderChange
com.google.firebase.firestore.DocumentChangeTest ‑ testDeletions
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-firestore

    TypeBase (2eb7cd7)Merge (78cec76)Diff
    aar1.44 MB1.44 MB+17 B (+0.0%)
    apk (release)11.3 MB11.3 MB+52 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/K6LkZHA6T1.html

@google-oss-bot
Copy link
Contributor

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-fst

    DeviceStatisticsDistributions
    oriole-32
    Percentile2eb7cd778cec76DiffSignificant (?)
    p10324 ±32 μs314 ±15 μs-9.78 μs (-3.0%)NO
    p25342 ±59 μs322 ±16 μs-19.3 μs (-5.6%)NO
    p50365 ±86 μs335 ±18 μs-29.7 μs (-8.1%)NO
    p75402 ±117 μs365 ±41 μs-37.5 μs (-9.3%)NO
    p90459 ±196 μs434 ±86 μs-24.9 μs (-5.4%)NO

    20 test runs in comparison
    CommitTest Runs
    2eb7cd7
    • 2024-09-05_14:43:18.113963_ZYPh
    • 2024-09-05_14:43:18.114016_bvUl
    • 2024-09-05_14:43:18.114028_gZli
    • 2024-09-05_14:43:18.114037_jaqw
    • 2024-09-05_14:43:18.114045_JJgj
    • 2024-09-05_14:43:18.114053_GhUl
    • 2024-09-05_14:43:18.114061_jxsd
    • 2024-09-05_14:43:18.114073_HJeq
    • 2024-09-05_14:43:18.114084_FpAF
    • 2024-09-05_14:43:18.114092_xCVW
    78cec76
    • 2024-09-05_20:03:54.231529_VCaW
    • 2024-09-05_20:03:54.231574_WldU
    • 2024-09-05_20:03:54.231585_ocle
    • 2024-09-05_20:03:54.231594_eRnz
    • 2024-09-05_20:03:54.231598_GhMI
    • 2024-09-05_20:03:54.231603_kPce
    • 2024-09-05_20:03:54.231606_Deyr
    • 2024-09-05_20:03:54.231612_MGwe
    • 2024-09-05_20:03:54.231620_bSRl
    • 2024-09-05_20:03:54.231636_RFlj
    redfin-30
    Percentile2eb7cd778cec76DiffSignificant (?)
    p10611 ±48 μs603 ±43 μs-7.81 μs (-1.3%)NO
    p25632 ±56 μs623 ±50 μs-8.67 μs (-1.4%)NO
    p50654 ±70 μs651 ±65 μs-3.29 μs (-0.5%)NO
    p75692 ±90 μs682 ±78 μs-9.26 μs (-1.3%)NO
    p90739 ±108 μs732 ±111 μs-6.91 μs (-0.9%)NO

    20 test runs in comparison
    CommitTest Runs
    2eb7cd7
    • 2024-09-05_14:43:18.113963_ZYPh
    • 2024-09-05_14:43:18.114016_bvUl
    • 2024-09-05_14:43:18.114028_gZli
    • 2024-09-05_14:43:18.114037_jaqw
    • 2024-09-05_14:43:18.114045_JJgj
    • 2024-09-05_14:43:18.114053_GhUl
    • 2024-09-05_14:43:18.114061_jxsd
    • 2024-09-05_14:43:18.114073_HJeq
    • 2024-09-05_14:43:18.114084_FpAF
    • 2024-09-05_14:43:18.114092_xCVW
    78cec76
    • 2024-09-05_20:03:54.231529_VCaW
    • 2024-09-05_20:03:54.231574_WldU
    • 2024-09-05_20:03:54.231585_ocle
    • 2024-09-05_20:03:54.231594_eRnz
    • 2024-09-05_20:03:54.231598_GhMI
    • 2024-09-05_20:03:54.231603_kPce
    • 2024-09-05_20:03:54.231606_Deyr
    • 2024-09-05_20:03:54.231612_MGwe
    • 2024-09-05_20:03:54.231620_bSRl
    • 2024-09-05_20:03:54.231636_RFlj
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile2eb7cd778cec76DiffSignificant (?)
    p10202 ±9 ms206 ±5 ms+4.07 ms (+2.0%)NO
    p25210 ±11 ms212 ±5 ms+1.82 ms (+0.9%)NO
    p50220 ±20 ms219 ±5 ms-1.10 ms (-0.5%)NO
    p75229 ±25 ms228 ±5 ms-1.60 ms (-0.7%)NO
    p90240 ±31 ms242 ±7 ms+2.04 ms (+0.8%)NO

    20 test runs in comparison
    CommitTest Runs
    2eb7cd7
    • 2024-09-05_14:43:18.113963_ZYPh
    • 2024-09-05_14:43:18.114016_bvUl
    • 2024-09-05_14:43:18.114028_gZli
    • 2024-09-05_14:43:18.114037_jaqw
    • 2024-09-05_14:43:18.114045_JJgj
    • 2024-09-05_14:43:18.114053_GhUl
    • 2024-09-05_14:43:18.114061_jxsd
    • 2024-09-05_14:43:18.114073_HJeq
    • 2024-09-05_14:43:18.114084_FpAF
    • 2024-09-05_14:43:18.114092_xCVW
    78cec76
    • 2024-09-05_20:03:54.231529_VCaW
    • 2024-09-05_20:03:54.231574_WldU
    • 2024-09-05_20:03:54.231585_ocle
    • 2024-09-05_20:03:54.231594_eRnz
    • 2024-09-05_20:03:54.231598_GhMI
    • 2024-09-05_20:03:54.231603_kPce
    • 2024-09-05_20:03:54.231606_Deyr
    • 2024-09-05_20:03:54.231612_MGwe
    • 2024-09-05_20:03:54.231620_bSRl
    • 2024-09-05_20:03:54.231636_RFlj
    redfin-30
    Percentile2eb7cd778cec76DiffSignificant (?)
    p10251 ±14 ms268 ±4 ms+17.1 ms (+6.8%)NO
    p25256 ±15 ms273 ±4 ms+16.9 ms (+6.6%)NO
    p50263 ±16 ms281 ±5 ms+17.5 ms (+6.6%)NO
    p75278 ±33 ms290 ±7 ms+12.1 ms (+4.4%)NO
    p90292 ±37 ms304 ±12 ms+11.4 ms (+3.9%)NO

    20 test runs in comparison
    CommitTest Runs
    2eb7cd7
    • 2024-09-05_14:43:18.113963_ZYPh
    • 2024-09-05_14:43:18.114016_bvUl
    • 2024-09-05_14:43:18.114028_gZli
    • 2024-09-05_14:43:18.114037_jaqw
    • 2024-09-05_14:43:18.114045_JJgj
    • 2024-09-05_14:43:18.114053_GhUl
    • 2024-09-05_14:43:18.114061_jxsd
    • 2024-09-05_14:43:18.114073_HJeq
    • 2024-09-05_14:43:18.114084_FpAF
    • 2024-09-05_14:43:18.114092_xCVW
    78cec76
    • 2024-09-05_20:03:54.231529_VCaW
    • 2024-09-05_20:03:54.231574_WldU
    • 2024-09-05_20:03:54.231585_ocle
    • 2024-09-05_20:03:54.231594_eRnz
    • 2024-09-05_20:03:54.231598_GhMI
    • 2024-09-05_20:03:54.231603_kPce
    • 2024-09-05_20:03:54.231606_Deyr
    • 2024-09-05_20:03:54.231612_MGwe
    • 2024-09-05_20:03:54.231620_bSRl
    • 2024-09-05_20:03:54.231636_RFlj

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/wraM7lNnoV/index.html

@dconeybe
Copy link
Contributor Author

dconeybe commented Sep 6, 2024

Closing PR as this work has been shelved and tracked by b/365092047

@dconeybe dconeybe closed this Sep 6, 2024
@dconeybe dconeybe deleted the dconeybe/MemoryMutationQueueDeque branch September 6, 2024 20:51
@firebase firebase locked and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants