Skip to content

Commit 3c63931

Browse files
committed
Document performance optimization
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent e422ffc commit 3c63931

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,34 @@ Examples:
243243
demo -r 2 0 # Clean roller effect, starfield only
244244
```
245245

246+
## Performance Optimization
247+
248+
### Resolution Scaling
249+
250+
For lower-powered systems (like Raspberry Pi), you can improve performance by rendering at a lower resolution. SDL2 will automatically scale the output to fullscreen or window size:
251+
252+
```bash
253+
# Render at half resolution (960x540) - ~75% performance gain
254+
./demo -f -w 960x540
255+
256+
# Render at 720p instead of 1080p - ~50% performance gain
257+
./demo -f -w 1280x720
258+
259+
# Docker example with performance mode
260+
docker run --rm -it \
261+
--privileged \
262+
-v /dev/fb0:/dev/fb0 \
263+
-v /dev/tty1:/dev/tty1 \
264+
ghcr.io/kernelkit/demo:latest \
265+
/app/start.sh -w 960x540
266+
```
267+
268+
**Tips:**
269+
- Lower resolutions reduce CPU/GPU load significantly
270+
- The demo maintains aspect ratio and visual quality during scaling
271+
- Try different resolutions to find the best balance for your hardware
272+
- Embedded systems (RPi4) benefit most from 960x540 or 1280x720
273+
246274
## Customizing Scroll Text
247275

248276
### Using Custom Text File

0 commit comments

Comments
 (0)