feat(native-export): scaffold local Expo module + native decode/encode bench probe (P0)
Local Kotlin module modules/recipescam-export (autolinked via expo ./modules) exposes decodeEncodeAsync — BitmapFactory decode -> JPEG q95 encode -> file, all on Dispatchers.IO off the JS/main threads. EXPO_PUBLIC_BENCH=1 builds run src/dev/nativeBenchProbe.ts: 3 timed decode+encode passes on the bundled wallframe artwork plus a JS-timer gap check proving the JS thread never blocks during native rendering. Legacy Skia engine untouched (reference).
This commit is contained in:
@@ -139,6 +139,13 @@ export default function App() {
|
||||
// Do NOT auto-load device GPS here — it would override photo GPS on library mode
|
||||
}, []);
|
||||
|
||||
// P0 spike: native decode/encode benchmark (EXPO_PUBLIC_BENCH=1 builds only).
|
||||
useEffect(() => {
|
||||
if (process.env.EXPO_PUBLIC_BENCH === '1') {
|
||||
import('./src/dev/nativeBenchProbe').then((m) => m.nativeBenchProbe());
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Save/restore session on app lifecycle changes
|
||||
useEffect(() => {
|
||||
const subscription = AppState.addEventListener('change', async (nextAppState) => {
|
||||
|
||||
Reference in New Issue
Block a user