id, title, category, status, source_trust_level, verification_status, created_at, updated_at, tags, tech_stack, applied_in, aliases
id
title
category
status
source_trust_level
verification_status
created_at
updated_at
tags
tech_stack
applied_in
aliases
rn-hermes-optimization
RN Hermes — Startup / Memory 최적화
Coding
draft
B
conceptual
2026-05-09
2026-05-09
react-native
hermes
performance
vibe-coding
language
applicable_to
Hermes / RN 0.70+
bytecode
AOT
source map
sampling profiler
RN Hermes 최적화
Hermes = RN 의 JS engine (JSC 대체). Bytecode precompile + small heap = 빠른 startup . 0.70+ default. profiler 사용 + 큰 deps 분할 + Hermes-friendly JS 작성이 핵심.
📖 핵심 개념
Bytecode (.hbc): build 시 미리 컴파일. 사용자 디바이스 parse 시간 0.
Sampling profiler: 무거운 함수 식별.
Source map: minified stack → 원본.
💻 코드 패턴
Hermes 활성화 (보통 디폴트)
Sampling profiler
Source map upload (Sentry)
Build-time bytecode precompile
RN 0.70+ Hermes 가 release build 에서 자동 .hbc 생성.
무거운 lib 회피
Splash screen 동안 critical asset 만 로드
InteractionManager — 무거운 작업 지연
🤔 의사결정 기준
측정
도구
Startup time
Flipper Hermes profiler
JS frame drop
Flipper Performance Monitor
Memory leak
Xcode Instruments (iOS), Profiler (Android Studio)
Bundle size
source-map-explorer (release bundle)
Native UI thread
Systrace / Perfetto
❌ 안티패턴
moment.js / lodash 통째 import : 번들 폭증. tree-shake / 대체.
JIT 가정 (eval, new Function) : Hermes 는 JIT 없음 — 런타임 컴파일 X. 디자인 회피.
production 에 console.log 남김 : bridge 부하. babel plugin 으로 제거.
번들 분석 없이 추측 : source-map-explorer.
Hermes off + 옛 JSC 유지 : startup 느림. 마이그레이션 가능한 한.
require 동적 호출 무절제 : dead code elim 깨짐.
🤖 LLM 활용 힌트
"Hermes 가정. moment 대신 date-fns 또는 Intl. console.log production 제거."
profiler 측정 후 최적화.
🔗 관련 문서