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

- fix #6164 optimize menu bar #6176

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

avramz
Copy link
Contributor

@avramz avramz commented Aug 2, 2024

  • move getAriaSetSize to computed
  • optimize getAriaPosInset

###Defect Fixes
Fixes #6164

getAriaSetSize was a method iterating over the whole (or subset) of items. Moved this to computed as it doesn't need any args
getAriaPosInset - slightly optimized so it works with computed list instead of executing the filtering over whole list every time.

- move getAriaSetSize to computed
- optimize getAriaPosInset
Copy link

vercel bot commented Aug 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2024 10:50am
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Aug 2, 2024 10:50am

@FabienVINCENT
Copy link
Contributor

maybe it should be extended to all menu components? example: TieredMenu

@avramz
Copy link
Contributor Author

avramz commented Aug 8, 2024

maybe it should be extended to all menu components? example: TieredMenu

Makes sense,getAriaSetSize (which is the biggest bottleneck) is also present in ContextMenuSub, MegaMenuSub, PanelMenuSub, and TieredMenuSub.

@tugcekucukoglu does this fix make sense to you, and should I apply it in other components?

@tugcekucukoglu tugcekucukoglu merged commit 42fe404 into primefaces:master Aug 22, 2024
4 checks passed
@tugcekucukoglu
Copy link
Member

I think it can be applied to other components as well.

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.

[MenuBar]: Slow performance
3 participants