starbugs / icedcoffee

A lightweight OpenGL user interface framework written in Objective-C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Control event dispatch exhibits bad performance on iOS

starbugs opened this issue · comments

ICTouchEventDispatcher performs hit tests on each touchesMoved: event received, which results in bad performance when dragging over ICControl-based nodes. A draggable control will receive touchesMoved: events too late on iOS devices, resulting in a serious lag when dragging over the touch display.

The issue has been fixed partially by avoiding processing multiple touchesMoved: events per frame in control event dispatch on iOS. This allows for acceptable performance in a simple test environment where a single touch is processed. However, even for a single touch (continuously moving) the framerate drops from 60 FPS to about 40 FPS on an iPhone 4S. Further optimizations for the iOS platform are required to improve this.

This fix may cause problems in configurations using on demand frame updates. This will be fixed as soon as extensive testing is done.