Page MenuHomePhabricator

[native] Add some memoization to `ColorSplotch`
ClosedPublic

Authored by atul on Sep 1 2023, 3:24 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Mon, Nov 11, 9:42 AM
Unknown Object (File)
Oct 23 2024, 3:35 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