Skip to content

[Due for payment 2025-07-14] [$250] Use Set for recentlyAccessedKeys in onyx #64773

Closed

Description

@mountiny

Coming from this proposal

Background

The proposal is a react-native-onyx change and comes from recent discussion.

Problem

In OnyxCache implements recentlyAccessedKeys with Array primitive, which has linear performance complexity when reading and iterating over it. Frequent reads and writes to recentlyAccessedKeys could yield negative perf implications.

Solution

Similarly to other OnyxCache properties, recentlyAccessedKeys can be refactored to use Set instead of Array to achieve constant I/O times.
Draft PR: Expensify/react-native-onyx#642

Results

Direct performance tests results for addEvictableKeysToRecentlyAccessedList shows significant reduction in processing duration:
🟢 OnyxUtils addEvictableKeysToRecentlyAccessedList one call adding 1k keys > Duration deviation of -23.93 ms (-95.79%) is within the allowed range of 10.00 ms (20.00%).
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021937282975946938682
  • Upwork Job ID: 1937282975946938682
  • Last Price Increase: 2025-06-23
Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. added
    External
    Daily
    Bug
    on Jun 23, 2025
  2. melvin-bot commented on Jun 23, 2025

    @melvin-bot
  3. changed the title [-]Use Set for recentlyAccessedKeys in onyx[/-] [+][$250] Use Set for recentlyAccessedKeys in onyx[/+] on Jun 23, 2025
  4. added
    Help Wanted
    on Jun 23, 2025
  5. melvin-bot commented on Jun 23, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

  6. melvin-bot commented on Jun 23, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  7. removed
    Help Wanted
    on Jun 23, 2025
  8. melvin-bot commented on Jun 27, 2025

    @melvin-bot

    @s77rt Whoops! This issue is 2 days overdue. Let's get this updated quick!

  9. 17 remaining items

  10. changed the title [-][$250] Use Set for recentlyAccessedKeys in onyx[/-] [+][Due for payment 2025-07-14] [$250] Use Set for recentlyAccessedKeys in onyx[/+] on Jul 7, 2025
  11. melvin-bot commented on Jul 7, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.76-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-07-14. 🎊

    For reference, here are some details about the assignees on this issue:

  12. melvin-bot commented on Jul 7, 2025

    @melvin-bot

    @s77rt @twisterdotcom The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  13. mountiny commented on Jul 7, 2025

    @mountiny
    ContributorAuthor

    $250 to @s77rt

  14. moved this from CRITICAL to Done in [#whatsnext] #qualityon Jul 7, 2025
  15. added
    Daily
    and removed
    Weekly
    on Jul 13, 2025
  16. s77rt commented on Jul 13, 2025

    @s77rt
    Member

    Given that this is not a bug, no checklist is due here ^

  17. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@twisterdotcom)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1937282975946938682/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  18. JmillsExpensify commented on Jul 15, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

  19. melvin-bot commented on Jul 16, 2025

    @melvin-bot

    @twisterdotcom Whoops! This issue is 2 days overdue. Let's get this updated quick!

  20. melvin-bot commented on Jul 18, 2025

    @melvin-bot

    @twisterdotcom Huh... This is 4 days overdue. Who can take care of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions