On Sat, 18 May 2024 18:39:42 GMT, Artem Semenov <[email protected]> wrote:

>> Caching children and selected children of the thee on the native level;
>> Caching all children of a specific parent in CAccessibility to enhance 
>> recursive children selection algorithm;
>> Removing fix for JDK-8317771 as no longer needed;
>
> src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m
>  line 352:
> 
>> 350: {
>> 351:     AWT_ASSERT_APPKIT_THREAD;
>> 352:     if ([self 
>> respondsToSelector:NSSelectorFromString(@"invalidateSelectionCache")]) {
> 
> You can override this method for the tree. to avoid checking the selector 
> support... This is a time-consuming procedure.

Sure.

> src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/OutlineAccessibility.h 
> line 36:
> 
>> 34:     BOOL rowCacheValid;
>> 35:     NSMutableArray<id<NSAccessibilityRow>> *selectedRowCache;
>> 36:     BOOL selectedRowCacheValid;
> 
> And can we use a single array for the cache in the same way as we do in Table 
> Accessibility?

They have different meanings and different content - plus selection being 
requested by OS much more frequently. And we do not want to invalidate the 
whole rows cache when selection changes - otherwise it will be pretty costly.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19255#discussion_r1605958647
PR Review Comment: https://git.openjdk.org/jdk/pull/19255#discussion_r1605958624

Reply via email to