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

isVisible is not caching correctly #1442

Closed
Jym77 opened this issue Jun 27, 2023 · 1 comment · Fixed by #1531
Closed

isVisible is not caching correctly #1442

Jym77 opened this issue Jun 27, 2023 · 1 comment · Fixed by #1531
Assignees
Labels
bug Report of unexpected or faulty behaviour in Alfa Performance Related to a performance improvement

Comments

@Jym77
Copy link
Contributor

Jym77 commented Jun 27, 2023

The cache lookup at https://github.com/Siteimprove/alfa/blob/main/packages/alfa-style/src/node/predicate/is-visible.ts#L42 is rebuilding a new option every time, which results in a cache miss since the old and new key are identical but separate objects 🙈

@Jym77 Jym77 added bug Report of unexpected or faulty behaviour in Alfa Performance Related to a performance improvement labels Jun 27, 2023
@Jym77 Jym77 assigned Jym77 and unassigned Jym77 Jun 27, 2023
@Jym77
Copy link
Contributor Author

Jym77 commented Nov 29, 2023

Use Context.empty() as default value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of unexpected or faulty behaviour in Alfa Performance Related to a performance improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants