KennethSundqvist / key-jump-browser-extension

Easier keyboard navigation. No mouse needed to click on links and stuff.
66 stars 14 forks source link

Cache the result of isElementVisible() to speed up rendering #49

Open KennethSundqvist opened 7 years ago

KennethSundqvist commented 7 years ago

Since we check all the parent elements of each target element we will check many elements multiple times, and since the rendering is blocking they can't change their state so we can cache the results to only need to do them once.

The cache should be cleared after the rendering is complete.