Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Recursive RoleSet identifier to all cache nodes #159

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TTWNO
Copy link
Member

@TTWNO TTWNO commented Nov 22, 2024

Thanks to my professor, Dr. Robert Benkoczi, for suggesting this idea.

This adds a recursive RoleSet to all nodes, which tells you what roles itself or its children have.

  • This increases insertion time from O(1) to O(k+c) where k is the number of ancestors of a given node, and c is the number of children.
  • This increases deletion time from O(1) to O(k+s) where k is the number of ancestors of a given node, an s is the total number of all siblings in k.
  • In both the above cases, the constant factor is very low (RoleSet is simply 134 bits and and ored to get results)
  • This decreases average time taken for structural navigation (find next node with role "X"), but technically in a very unbalanced or skewed tree it could still take O(n) time (but, due to the comparative shallowness and balance of the accessibility tree, it is generally much faster).

TODO

  • Structural navigation benchmark (modify existing traversal benchmark)
    • test on main and this branch
  • Convert existing JSON struct to one with valid RoleSets
  • Consider possibility of adding likewise: AttributeSet or StateSet for all nodes as well (even if just for limited structural navigation reasons like unvisited links or checked boxes)
  • See if something like this could be a bit more generic (this interface currently requires a lot of manual updating logic)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant