Yes, as in the amount of code that runs between phx:page-loading-start and phx:page-loading-stop is too much. The callback in startViewTransition should only be wrapped around the code that updates the DOM. With your code it fetches the page, calculates the diff, applies the diff and maybe more, not sure.
This leads to unresponsive navigation for me and adds significant delay.
My version is “worse” in that it wraps an unknown amount of code that might or might not wrap the actual dom update. But for me it is still “better”, since it never slows down navigation, it just doesn’t always actually trigger the transition. If I increase the timeout to 100ms I can already feel the slowdown, so I kept it very low.






















