Skip to content

[Due for Payment 03-11-2026] Reduce Onyx subscription overhead in LHN avatar rendering #82544

Closed

Description

@mountiny

Coming from a proposal here

Background

Each LHN row currently renders ReportActionAvatars, a general-purpose component that calls useReportActionAvatars internally. This hook subscribes to multiple Onyx keys (personal details, reports, transactions) to compute avatar icons on every render — even though the LHN already has pre-computed optionItem.icons available.

With ~20 visible rows, this results in ~200 redundant Onyx subscriptions that re-trigger on unrelated data changes, causing unnecessary re-renders and degrading scroll performance.

Problem:

When the LHN renders 20+ visible chat rows, each row's ReportActionAvatars component creates ~10 redundant Onyx subscriptions via useReportActionAvatars to recompute icon data that is already available in pre-computed form, resulting in ~200 unnecessary subscriptions that consume memory, process change events on every Onyx update, and degrade scrolling and interaction performance.

Solution:

Replace ReportActionAvatars in OptionRowLHN with a new LHNAvatar component that accepts pre-computed optionItem.icons directly, eliminating the useReportActionAvatars hook and its ~10 Onyx subscriptions per row.

The component is split into three files in LHNOptionsList/:

  1. LHNAvatar.tsx — Orchestrator that selects layout (single / subscript / diagonal) and renders single avatars. No Onyx subscriptions.
  2. LHNAvatarSubscript.tsx — Workspace icon + user avatar in subscript position.
  3. LHNAvatarDiagonal.tsx — Two overlapping avatars for group chats, with style maps.

All components maintain 1:1 functional parity

For a typical 20-row LHN, this eliminates ~200 unnecessary Onyx subscriptions while keeping identical visual output, tooltips, and accessibility.
ManualNavigateToInboxTab span reduced 1230ms -> 1099ms

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    Bug
    on Feb 16, 2026
  2. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  3. abbasifaizan70 commented on Feb 16, 2026

    @abbasifaizan70
    Contributor

    I can work on this if it's open for external contributors.

  4. melvin-bot commented on Feb 19, 2026

    @melvin-bot

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

  5. JS00001 commented on Feb 19, 2026

    @JS00001
    Contributor

    The PR is in review

  6. BartekObudzinski commented on Feb 20, 2026

    @BartekObudzinski
    Contributor

    The design team is preparing Avatar's matrix for LHN cases that could occur, I need to validate it again as we discussed with the reviewer as part of the PR

  7. 9 remaining items

  8. JS00001 commented on Mar 9, 2026

    @JS00001
    Contributor

    @shubham1206agra I think you still need payment here, right?

  9. shubham1206agra commented on Mar 9, 2026

    @shubham1206agra
    Contributor
  10. changed the title [-]Reduce Onyx subscription overhead in LHN avatar rendering[/-] [+][Due for Payment 03-11-2026] Reduce Onyx subscription overhead in LHN avatar rendering[/+] on Mar 9, 2026
  11. added
    Awaiting Payment
    on Mar 9, 2026
  12. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.

  13. mallenexpensify commented on Mar 9, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @shubham1206agra due $250 via NewDot (on March 11th)

  14. garrettmknight commented on Apr 2, 2026

    @garrettmknight
    Contributor

    $250 approved for @shubham1206agra

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

Metadata

Metadata

Labels

Awaiting PaymentBugDaily

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions