Skip to content

Camera jank caused by unnecessary Onyx re-renders on the scan screen #85583

Closed
6 of 6 issues completed
Closed

Description

@marcaaron

Problem

When using the scan screen, ~15 Onyx keys are subscribed to on every mount regardless of which scan flow is active. Global Onyx events like new chat messages or report updates trigger re-renders while the camera is active, causing camera jank for the most common scan paths (from report, edit receipt, global create).

Solution

Decompose the monolithic scan screen into 4 focused components (ScanEditReceipt, ScanFromReport, ScanGlobalCreate, ScanSkipConfirmation), each subscribing only to the Onyx data it actually needs.

  • The three most common paths drop from ~15 subscriptions to 3-4
  • Global Onyx events no longer trigger re-renders in the camera for those flows
  • The skip-confirmation path keeps its subscriptions but no longer penalizes everyone else

Activity

  1. melvin-bot commented on Mar 20, 2026

    @melvin-bot

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

  2. melvin-bot commented on Mar 20, 2026

    @melvin-bot

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

  3. marcaaron commented on Mar 21, 2026

    @marcaaron
    ContributorAuthor

    These are being worked on

  4. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    @adhorodyski Still overdue 6 days?! Let's take care of this!

  5. marcaaron commented on Mar 25, 2026

    @marcaaron
    ContributorAuthor

    PR is in progress: #85571

  6. adhorodyski commented on Mar 25, 2026

    @adhorodyski
    Contributor

    yess thank you for updating

  7. adhorodyski commented on Mar 27, 2026

    @adhorodyski
    Contributor

    @rinej is finishing up the blueprint PR and keeping it up to date. we'll wrap up measurements and provide a plan for splitting it down into smaller PRs soon.

  8. melvin-bot commented on Mar 30, 2026

    @melvin-bot

    @adhorodyski Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  9. 52 remaining items

  10. cristipaval commented on May 4, 2026

    @cristipaval
    Contributor

    Making this Weekly since we now work on subissues

  11. rinej commented on May 4, 2026

    @rinej
    Contributor

    Thanks for splitting it, it will make our life much easier! I will share the PRs for next steps soon

  12. cristipaval commented on May 14, 2026

    @cristipaval
    Contributor

    Update

    PR for the 3rd step from the decomposition plan is in review

  13. cristipaval commented on May 25, 2026

    @cristipaval
    Contributor

    The 3rd PR from the decomposition plan is close to getting merged

  14. rinej commented on Jun 2, 2026

    @rinej
    Contributor

    Also we merged the last one with the cleanup -> #91855

  15. cristipaval commented on Jun 11, 2026

    @cristipaval
    Contributor

    @rinej could you please look into #89386?

  16. cristipaval commented on Jun 17, 2026

    @cristipaval
    Contributor

    All good here

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions