Page MenuHomePhabricator

[native] Add some memoization to `ColorSplotch`
ClosedPublic

Authored by atul on Sep 1 2023, 3:24 PM.
Tags
None
Referenced Files
F3048863: D9071.diff
Wed, Oct 23, 1:16 AM
F3043149: D9071.id30814.diff
Tue, Oct 22, 2:17 PM
F3043148: D9071.id30812.diff
Tue, Oct 22, 2:17 PM
F3043147: D9071.id30711.diff
Tue, Oct 22, 2:17 PM
F3043128: D9071.id.diff
Tue, Oct 22, 2:17 PM
F3036099: D9071.diff
Tue, Oct 22, 5:04 AM
Unknown Object (File)
Sep 21 2024, 12:11 PM
Unknown Object (File)
Sep 13 2024, 5:39 AM
Subscribers

Details

Summary

Based on profiling, re-renders of ColorSplotch are expensive because of the SVGs within. Because we were passing squircleParams to SquircleView as raw object, ColorSplotch got recreated every time.

I think we should just get rid of SquircleView altogether and just use the more performant View. We only use SquircleView (via ColorSplotch) in UnreadDot and ThreadSettings... neither of which are places where the distinction between squircle, circle, or rounded rectangle really matter. For context, we originally used Squircle for ColorSplotchs that appear where user/thread avatars appear today.


Depends on D9070

Test Plan

Things continue to work as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable