Migrate feed and tab bar icons to react-native-nano-icons

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>
This commit is contained in:
Tomek Zawadzki
2026-08-24 19:33:57 +02:00
parent 6009e61ae9
commit 3606c48f02
47 changed files with 347 additions and 39 deletions
+1
View File
@@ -238,6 +238,7 @@
"react-native-gesture-handler": "~2.32.0",
"react-native-keyboard-controller": "1.21.9",
"react-native-mmkv": "^3.3.3",
"react-native-nano-icons": "^0.2.1",
"react-native-pager-view": "6.8.0",
"react-native-progress": "^5.0.1",
"react-native-qrcode-styled": "^0.3.3",