- Issue created by @acbramley
When debugging
🐛
ViewsConfigUpdater $deprecationsEnabled flag does not persist to preSave hook
Active
I noticed that the process functions in ViewsConfigUpdater were running many times for the same view. processTableCssClassUpdate
is probably the worst example of this where it runs >10 times for a single update hook.
This is for 2 reasons:
1. needsTableCssClassUpdate
uses processDisplayHandlers
which runs through a bunch of different types of displays, but processTableCssClassUpdate
just takes the view. I think this wrapper could be removed entirely.
2. The main reason - for each update that runs and returns TRUE, a save happens on the view config entity. This triggers ViewsHooks::viewPresave
which runs ViewsConfigUpdater::updateAll
, which will run all updates again which also wraps them in the processDisplayHandlers
loops.
This could become extremely slow for sites with a lot of views.
Add a breakpoint into ViewsConfigUpdater::processTableCssClassUpdate
with a condition on a particular view id
Count how many times it breaks.
Remove processDisplayHandlers where it's not needed
Figure out how we track which updates have run on which views and don't run them again?
Active
11.0 🔥
views.module