PDF Presentation - Uplinq
PDF Presentation - Uplinq
PDF Presentation - Uplinq
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Event Handling<br />
• A backlog in the event queue translates into perceived delay for the user<br />
– Validate that the event arrival rate of your design, combined with the other system events can be<br />
processed by the system without a queue becoming so deep that it impacts the users perception<br />
of responsiveness, or that the system elects to drop events<br />
– When exceeding this threshold one needs to consider if the "event" being processed is more<br />
optimally treated as data. Touch screen events are a common example. Handwriting recognition<br />
improves with the number of samples per second. Treating every sample as an event can flood<br />
the even handling mechanism. Grouping down events into a list of data, with a time derived event,<br />
can improve performance.<br />
• Event prioritization and/or creating independent UI tasks can have an advantage<br />
– Take the example of a single threaded UI downloading a web page. If single threaded, and polling<br />
a queue, the page download would not be interruptible until the download is complete. This is an<br />
extreme hypothetical, example.<br />
• Do not use the event queue as a polling mechanism<br />
– For example, in Brew ® , do not post an event to yourself, check some conditions in the event<br />
handler, and then re-post the same event if the condition hasn't been satisfied yet. If you must<br />
periodically check some condition, use a timer with a non-zero delay and check the conditions<br />
in the timer callback handler.<br />
11