alleyinteractive / alleyinteractive/wordpress-fieldmanager
fm_renumber performance
- Lingua principale
- PHP
- Stelle
- 563
- Fork
- 99
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
`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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.