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

fm_renumber performance #829

Open
mboynes opened this issue Mar 1, 2022 · 0 comments
Open

fm_renumber performance #829

mboynes opened this issue Mar 1, 2022 · 0 comments
Labels
enhancement New feature or request help wanted

Comments

@mboynes
Copy link
Contributor

mboynes commented Mar 1, 2022

fm_renumber() in fieldmanager.js performs a lot of DOM traversal, and it would appear that much of it is duplicative in deeply nested groups and should be unnecessary.

This function should be refactored to, ideally, only visit each field once. Second best option is that each field is visited only the number of times as it has incrementable keys (as denoted by data-fm-array-position in .fm-wrapper nodes). As it presently stands, each field is visited an exponential number of times based on its depth and the ancestral group structure.

Also see #827, #828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted
Projects
None yet
Development

No branches or pull requests

1 participant