Skip to content

[Performance] [Audit]: messages with Views nested in Text for inline code are 700% slower to render on Android #4126

Description

@jsamr

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


This report is part of #3957, scenario "Rendering Individual chat messages".

Flamegraph

This flamegraph shows commit c153. The full commit log is available HERE to inspect in Flipper / React Devtools (you will have to unzip it first).

image

Commit c153 refers to one RenderHtml component with 20 words wrapped in inline code. Something like this:

`inline code spanning multiple lines inline code spanning multiple lines inline code spanning multiple lines inline code spanning multiple lines`

Its rendering time is 112ms (yellow bar in chart below). All other messages (green bars), including some messages with as many words are rendered between 8 to 14ms. So that's a minimal overhead of 112 / 14 = 8 or +700%.

image

Proposal: Review InlineCode

Review if the design requirements that have led to implementation of #2527 are worth the rendering cost. You might want to profile this on iOS also.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions