Hit Test Thread for Web Content Response Time
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Hit testing in web content systems often delays user responses due to being performed on the main thread, which is frequently busy with other tasks, leading to degraded user experience, especially on low-end hardware.
Innovation Solution
Implementing a separate hit test thread independent of the main thread allows for quick target identification and manipulation handling, such as panning and pinch zooming, without blocking the main thread, using a scoped display tree traversal and Cascading Style Sheets (CSS) rules to declare default behaviors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If hit testing is performed on the main thread, then the system can maintain a single-threaded architecture which is simpler to implement, but the user interface thread is blocked for prolonged periods causing degraded user experience
Solution Approach 1:
The patent divides the single main thread into multiple separate threads: a main thread for user interface rendering and a dedicated hit test thread for coordinate-to-content mapping. This segmentation allows hit testing operations to occur independently without blocking the main UI thread, resolving the contradiction between architectural simplicity and response time performance.
2Loss of time
If a separate hit test thread is implemented, then hit test response time is consistently quick, but the system architecture becomes more complex with multiple threads
Solution Approach 1:
The patent introduces a content renderer component as an intermediary that bridges the hit test thread and the display list. The hit test thread requests content information from the renderer, which provides the necessary display list data without requiring the main thread to be involved in hit testing operations. This mediator approach enables multi-threaded architecture while managing complexity through clear separation of concerns.
3Measurement precision
If full tree traversal is performed for hit testing, then complete content coverage is achieved, but processing time increases significantly especially on low-end hardware
Solution Approach 1:
The patent implements a hybrid approach where the system performs partial tree traversal only when necessary. The hit test thread first attempts to resolve hits using cached display list information from the content renderer. Full tree traversal is performed only when the cached information is insufficient or outdated, thereby maintaining hit test accuracy while significantly reducing processing time on low-end hardware.
Data Source
AI summary
In one or more embodiments, a hit test thread which is separate from the main thread, e.g. the user interface thread, is utilized for hit testing on web content. Using a separate thread for hit testing can allow targets to be quickly ascertained. In cases where the appropriate response is handled by a separate thread, such as a manipulation thread that can be used for touch manipulations such as panning and pinch zooming, manipulation can occur without blocking on the main thread. This results in the response time that is consistently quick even on low-end hardware over a variety of scenarios.


