|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-2BF409EA-82BF-407C-B048-DA0973B7F61D" xml:lang="en"><title>Optimizing |
|
13 feedback latency</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>The general latency requirement for touch feedback is 30 milliseconds. |
|
15 For direct feedback it is not always possible to achieve this, as in high |
|
16 CPU load cases it may take more than 30 ms already before the pointer event |
|
17 reaches the application. </p> |
|
18 <p>However, you can also affect the latency in your application: the maximum |
|
19 additional latency for direct feedback is as long as it takes for the longest |
|
20 running <codeph>RunL</codeph> of any active object running in application’s |
|
21 thread to execute. Hence keeping all <codeph>RunL</codeph> functions short |
|
22 improves the feedback latency (and of course also improves the overall responsiveness |
|
23 of the application). </p> |
|
24 <p>Another way of improving the latency is optimizing redrawing in such a |
|
25 way that only the necessary area of the screen is drawn. </p> |
|
26 <p>For example, if there are 20 buttons in the application and one of them |
|
27 is pressed down by a pointer event, then only that button should be redrawn |
|
28 and not the whole screen. This optimization improves both direct and area |
|
29 registry based feedback, because the window server cannot receive pointer |
|
30 events from the touch driver in case it is performing a draw operation, and |
|
31 unnecessarily massive draw operations can thus have significant effect on |
|
32 the latency.</p> |
|
33 <p>Finally, it is recommended that you trigger direct feedback in <codeph>HandlePointerEventL</codeph> as |
|
34 the first thing before doing any other processing, such as redrawing.</p> |
|
35 </conbody></concept> |