Skip to content

[Metrics] Improve ManualSendMessageVisible (send message performance) #99415

Open
7 of 8 issues completed
Open

Description

@cristipaval

Objective

Improve the Send a Message performance metric, measured by the ManualSendMessageVisible Sentry span. This span ends when the message is actually painted on screen (onLayout), so it reflects the real time a user waits after pressing Send.

Target: 300ms (P90)

Current: ~495ms (P90) — still ~195ms over target.

Background

This replaces #77176, which tracked the old ManualSendMessage span. That span ended in a useEffect flush that fired before the message was painted, so it did not measure what the user actually waits for. We ran both spans side by side for ~2 weeks; they disagreed about direction, and the visible one proved to be the honest number. The old span is being removed in #99403, and this issue starts a clean tracking thread so the old investigation history does not carry over.

Dashboard: https://expensify.sentry.io/dashboard/9443290/?statsPeriod=7d

Issue OwnerCurrent Issue Owner: @LukasMod

Sub-issues

Sub-issues

7 of 8 Issues completed
Loading 8 sub-issues

Activity

  1. LukasMod commented on Sep 10, 2026

    @LukasMod
    Contributor

    @cristipaval
    It's not so much about the metric itself, but I found a small thing while researching Onyx subscriptions around related components. It's worth cleaning up and would save 2 app-wide subscriptions (policyCategories_ was solely used by it). These aren't used by row items today, so it's probably some leftover from previous work, not worth to app-wide sub.

    PR that cleans it up and adds tests: #100699

    Image
  2. cristipaval commented on Sep 10, 2026

    @cristipaval
    ContributorAuthor

    Thanks @LukasMod! I've created an issue for that

  3. LukasMod commented on Sep 25, 2026

    @LukasMod
    Contributor

    @cristipaval I’ll be OOO from 28.09 to 01.10. Someone from the team will pick this up while I’m away if there’s a need for urgent work.

  4. cristipaval commented on Sep 25, 2026

    @cristipaval
    ContributorAuthor

    thanks a lot @LukasMod 🙏

    Enjoy your ooo!

  5. LukasMod commented on Oct 16, 2026

    @LukasMod
    Contributor

    Update

    A few send-message metric-related issues have been merged or are in review.

    Ongoing:

    Future:

    I've also checked a bunch of ideas recently, looking for more opportunities, but nothing new has stood out so far. The most promising one was Sound module loading on the first message, mostly on mobile. I tried moving it and preloading it, but neither approach made a meaningful difference in the results, so I dropped that idea.

    I also run some analyze around android slow spans. Android high-class matches iOS high-class (481 vs 453ms). The Android p95 gap is mostly low-class devices (12% of sends, 86% of the tail), and a few heavy low-end users dominate it. Medium-class Android is also slower than iOS but not that much.

    Two users carry half the tail. An Infinix X6528 user (21020242, the same one as in the earlier data) and an SM-A047F user (23151822) account for 56 of the 111 slow sends. Excluding just those two, Android p95 drops from 1,333 to 1,013ms.

    ManualSendMessageVisible by device class, Oct 9-16, 2026 (last 7 days):

    Filter: environment:production span.status:ok !tags[canceled,boolean]:true, all releases

    Platform Device class Sends p50 p95
    iOS all 7,090 165ms 475ms
    iOS high 6,577 165ms 453ms
    iOS medium 275 276ms 796ms
    Android all 2,236 260ms 1,333ms
    Android without low 1,958 n/a 680ms
    Android high 1,342 214ms 481ms
    Android medium 496 373ms 1,215ms
    Android low 278 831ms 2,456ms
    Android all, without 2 heavy low-end users 2,168 254ms 1,013ms
  6. LukasMod commented on Nov 3, 2026

    @LukasMod
    Contributor

    I noticed today that many send message spans were landing in our fallback other_chat bucket. It turned out our tracking didn’t recognize messages sent in support tickets, so it filed them all there. I prepared PR to give support tickets their own source which lets us measure that flow separately and stops other_chat from hiding where messages are actually sent
    PR: #105775

  7. expensify-chore-bot commented on Nov 26, 2026

    @expensify-chore-bot

    This issue has not been updated in over 15 days. @Julesssss, @cristipaval, @LukasMod eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions