[Accessibility] [Fwd: [Accessibility-ia2] Big performance problems caused by relation API (problem inherited from ATK/AT-SPI)]

David Bolter david.bolter at utoronto.ca
Fri May 18 08:19:20 PDT 2007


Peter,

+1

Definitely!  For the reasons Aaron mentions.

cheers,
David

Peter Korn wrote:
> FYI - from Aaron on the IAcc2 alias.  This might be a useful API 
> change for us to consider in UNIX land...
>
>
> Peter
>
> ------------------------------------------------------------------------
>
> Subject:
> [Accessibility-ia2] Big performance problems caused by relation API 
> (problem inherited from ATK/AT-SPI)
> From:
> Aaron Leventhal <aaronlev at moonset.net>
> Date:
> Fri, 18 May 2007 00:28:58 -0400
> To:
> IA2 list <accessibility-ia2 at lists.freestandards.org>
>
> To:
> IA2 list <accessibility-ia2 at lists.freestandards.org>
>
>
> Usually an AT won't want all the relations on all elements, but the 
> current API requires that the application calculate all of that, even 
> when the AT only wants a specific relation.
>
> Let's say an AT wants a specific relation, like "controlledby"
> The current API requires that the AT either:
> 1) get all the relations at once and search the array internally for 
> correct relation type
> 2) get the relations one at a time starting at index 0 and check each to 
> see if it's the correct relation type
>
> In both scenarios the application needs to create many more relation. 
> Although option 2 could be slightly more optimal, is is still O(n^2) and 
> either requires caching or continual recalculation of the early 
> relations in the array, to see if they exist.
>
> This is terrible for performance, because in HTML the calculating the 
> relation often requires searching the DOM tree local to the node. This 
> is because the markup only sets the relation in one direction (e.g. 
> <label for>, aaa:controlledby, etc.)
>
> What is much, much better is to allow the AT to have random access by 
> relation type.
>
> I propose that GetRelation() be changed to allow a relationType index to 
> be passed in. The change can be made without changing the binary 
> footprint of the APIs. Is anyone using IA2 accessible relation yet?
>
> - Aaron
>
> _______________________________________________
> Accessibility-ia2 mailing list
> Accessibility-ia2 at lists.freestandards.org
> http://lists.freestandards.org/mailman/listinfo/accessibility-ia2
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Accessibility mailing list
> Accessibility at lists.freestandards.org
> http://lists.freestandards.org/mailman/listinfo/accessibility
>   




More information about the Accessibility mailing list