Prefetching can be interupted by other service requests.
Slow prefetch requests would block user interactive requests, creating noticeable sluggishness and unresponsiveness in accessibility services, especially on the web. Let's make it so a user interactive requests stops prefetching. We can't interupt an API call, but we can stop in between API calls. On the service side, we have to seprate the prefetch callbacks from the find callback. And we have to make it asynchrnous. It does dispatch into the main thread, so the AccessibilityCache can remain single threaded. When the calls are interupted on the application side, returnPendingFindAccessibilityNodeInfosInPrefetch checks the find requests that are waiting in the queue, to see if they can be addressed by the prefetch results. If they can be, we don't have to call into potentially imperformance application code. Bug:30969887 Test: Performance measurements, tried it out by hand to see if their are any bugs. CTSAccessibility* Change-Id: Ia8f1152afa3987f262f37ed4583775acdd32db43
Loading
Please register or sign in to comment