Skip to content

[HOLD for payment 2023-01-19] [Performance] Use react-native-quick-sqlite instead of asyncStorage #10793

Closed

Description

@Szymon20000

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


What performance issue do we need to solve?

reducing time spend on serialisation/deserialisation and generally bridge overhead.

What is the impact of this on end-users?

slower app

List any benchmarks that show the severity of the issue

https://github.com/mrousavy/react-native-mmkv#benchmark

Proposed solution (if any)

use react-native-mmkv for Onyx

List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)

Note: These should be the same as the benchmarks collected before any changes.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

Activity

  1. melvin-bot commented on Sep 2, 2022

    @melvin-bot

    Triggered auto assignment to @thienlnam (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. melvin-bot commented on Sep 2, 2022

    @melvin-bot

    📣 @Szymon20000! 📣
    Please report bugs or suggest features in the #expensify-open-source Slack channel, don't directly open issues in this repo!
    Instructions here to join the channel 📖

  3. roryabraham commented on Sep 5, 2022

    @roryabraham
    Contributor

    Switching this to weekly

  4. added
    Weekly
    and removed
    Daily
    on Sep 5, 2022
  5. 39 remaining items

  6. marcaaron commented on Dec 23, 2022

    @marcaaron
    Contributor

    Web Browser - no as we are not messing with web storage in this change.
    Native - I guess we could clear this. I'm not sure if it's worth it. Fresh install of the app would eventually clear out this data. We can always do a simple migration that just does AsyncStorage.clear() (but requires that we include the library forever just for this purpose).

  7. kidroca commented on Dec 23, 2022

    @kidroca
    Contributor

    Ah, also, I think we should add something to delete all the existing data from the old place, no? Or would the browser clear it out eventually?

    Good point, I don't know - need to research this

    In any case to make migrations easier to manage problems like these we need to update the migration system a bit so that

    • migrations can be loaded on demand (e.g. require calls)
    • irrelevant migrations can be dropped, or at least not required

    This would allow us to use dependencies in migrations (e.g. AsyncStorage), and perhaps carry them for a month or 2 (using some heuristics - e.g. are there any users using a version predating the migration) after they are no longer needed we can drop them altogether

  8. JmillsExpensify commented on Jan 11, 2023

    @JmillsExpensify
    Contributor

    @tgolen Isn't this issue done at this point?

  9. roryabraham commented on Jan 11, 2023

    @roryabraham
    Contributor

    The PR to upgrade E/App to use the new quick-sqlite based version of Onyx was deployed to staging in #14188, not yet deployed to production

  10. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Jan 12, 2023
  11. changed the title [-][Performance] Use react-native-quick-sqlite instead of asyncStorage[/-] [+][HOLD for payment 2023-01-19] [Performance] Use react-native-quick-sqlite instead of asyncStorage[/+] on Jan 12, 2023
  12. melvin-bot commented on Jan 12, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.52-4 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 2023-01-19. 🎊

    After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  13. melvin-bot commented on Jan 12, 2023

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [] The PR that introduced the bug has been identified. Link to the PR:
    • [] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@JmillsExpensify] A regression test has been added or updated so that the same bug will not reach production again. Link to the GH issue for creating the test here:
  14. mountiny commented on Jan 12, 2023

    @mountiny
    Contributor

    I think there is nothing else to do here since payments are handled by different flow in this case. Should we close this issue or anything else left? 🎉

  15. JmillsExpensify commented on Jan 18, 2023

    @JmillsExpensify
    Contributor

    @Szymon20000 Can you make sure that we handle your individual $1,000 bonus for this issue on Margelo invoice?

  16. JmillsExpensify commented on Jan 18, 2023

    @JmillsExpensify
    Contributor

    @mountiny I'll go ahead and close the issue, though can you double confirm that the BZ checklist above doesn't apply?

  17. mountiny commented on Jan 18, 2023

    @mountiny
    Contributor

    It does not apply in this case!

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

Metadata

Metadata

Labels

Awaiting PaymentBugEngineeringReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions