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
372 B
XML
2 lines
372 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="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm13.633-3.274a1 1 0 0 1 .141 1.407l-4.5 5.5a1 1 0 0 1-1.481.074l-2-2a1 1 0 1 1 1.414-1.414l1.219 1.219 3.8-4.645a1 1 0 0 1 1.407-.141Z"/></svg>
|