-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Performance] [Audit]: messages with Views
nested in Text
for inline code are 700% slower to render on Android
#4126
Comments
Triggered auto assignment to @laurenreidexpensify ( |
Views
nested in Text
for inline code are 700% slower to render on Android
Interesting. I'm not sure if this is a mainline case that we need to prioritize for inline code blocks are kind of a power user feature. I think we are more generically concerned with the typical usage scenarios which is probably ... not using any markdown at all. But not too sure. Will let others share their thoughts on this. 700% sounds pretty bad but we can also test the performance here... Benchmarking idea:
Does it take an excessive amount of time to render the chat with inline code blocks? |
Views
nested in Text
for inline code are 700% slower to render on AndroidViews
nested in Text
for inline code are 700% slower to render on Android
This is still on hold |
Will review this when N6 hold is off |
Views
nested in Text
for inline code are 700% slower to render on AndroidViews
nested in Text
for inline code are 700% slower to render on Android
@laurenreidexpensify This was created months back. back than there was no such policy. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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).
Commit c153 refers to one
RenderHtml
component with 20 words wrapped in inline code. Something like this: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%.
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.
The text was updated successfully, but these errors were encountered: