3606c48f02
react-native-svg materialises three native views per icon (SvgView + Group + Path). Feed screens render around a thousand icons, so that is ~2400 views and ~2400 shadow nodes of pure overhead per profile load. Move the 28 icons that repeat on feed screens - the post action bar, feed row reason, post embeds, the loading skeleton and the bottom tab bar - to react-native-nano-icons, which draws each icon as a single native text glyph. The SVG sources are generated from the existing icon path data so the geometry is unchanged, and `createNanoIcon` mirrors the `useCommonSVGProps` contract so call sites are one-line import swaps. Measured on a Samsung Galaxy A16 (SM-A165F, Android 16) with release builds, 10 runs per condition: native views -20.6%, icon construction -45.3%, JS-thread CPU -6.1%, main-thread CPU -3.3%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2 lines
442 B
XML
2 lines
442 B
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" clip-rule="evenodd" d="M4.216 8.815a7.853 7.853 0 0 1 15.568 0l1.207 9.053A1 1 0 0 1 20 19h-3.354c-.904 1.748-2.607 3-4.646 3-2.039 0-3.742-1.252-4.646-3H4a1 1 0 0 1-.991-1.132l1.207-9.053ZM9.778 19c.61.637 1.399 1 2.222 1s1.613-.363 2.222-1H9.778ZM12 4a5.853 5.853 0 0 0-5.802 5.08L5.142 17h13.716l-1.056-7.92A5.853 5.853 0 0 0 12 4Z"/></svg>
|