Tips untuk meningkatkan performa Electron app agar tidak lag.
Optimasi berikut sudah otomatis aktif di Electron:
✅ Lower Resolution: 640x480 (vs 1280x720 di web) ✅ Single Hand Detection: Hanya 1 tangan (vs 2 di web) ✅ Disabled Connections: Tidak render skeleton lines ✅ Adaptive Frame Skipping: Skip frame jika processing lambat ✅ GPU Disabled: Menghindari GPU crash ✅ Smaller Buffer: History buffer lebih kecil
Klik tombol "Toggle Visualization" untuk mematikan overlay.
Atau edit src/js/config/electronConfig.js:
visualization: {
enabled: false // Matikan semua visualization
}Impact: +10-15 FPS
Edit src/js/config/electronConfig.js:
camera: {
resolution: {
width: 320, // Sangat rendah tapi cepat
height: 240
}
}Impact: +5-10 FPS
performance: {
targetFPS: 20 // Lower = less CPU
}Impact: Lebih smooth, less CPU
mediapipe: {
minDetectionConfidence: 0.7, // Higher = less processing
minTrackingConfidence: 0.7
}Impact: +2-5 FPS, tapi kurang sensitif
Edit src/js/config/gestureConfig.js:
// Disable gestures yang tidak dipakai
pinch: {
enabled: false
},
push: {
enabled: false
}Impact: +1-3 FPS per gesture
| Setting | Web Mode | Electron Default | Electron Optimized |
|---|---|---|---|
| Resolution | 1280x720 | 640x480 | 320x240 |
| Max Hands | 2 | 1 | 1 |
| Connections | Yes | No | No |
| Target FPS | 30 | 30 | 20 |
| Expected FPS | 30-60 | 20-30 | 25-40 |
Download model untuk menghindari network latency:
# Download model
curl -o src/models/hand_landmarker.task https://storage.googleapis.com/mediapipe-models/hand_landmarker/hand_landmarker/float16/1/hand_landmarker.task