Page MenuHomePhabricator

[native] Add some memoization to `ColorSplotch`
ClosedPublic

Authored by atul on Sep 1 2023, 3:24 PM.
Tags
None
Referenced Files
F3388945: D9071.id30814.diff
Fri, Nov 29, 4:46 PM
F3388562: D9071.diff
Fri, Nov 29, 2:55 PM
Unknown Object (File)
Thu, Nov 21, 6:51 AM
Unknown Object (File)
Thu, Nov 21, 6:51 AM
Unknown Object (File)
Thu, Nov 21, 6:51 AM
Unknown Object (File)
Thu, Nov 21, 6:50 AM
Unknown Object (File)
Thu, Nov 21, 6:45 AM
Unknown Object (File)
Sun, Nov 17, 1:50 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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage