Latence after changing route and return to builder page
Closed this issue · 3 comments
Hi, first i want to thank you for this greet work, i'm using your project in a new project where users can build their own store, the problem i'm facing is when changing pages and return to the store builder page the builder begane to be too slow, any idea on how to fix performance slow ??
Thank you for your feedback. From what I've read though, there is nothing tangible that I can start from.
Performance issues can occur due to many reasons, especially that the builder performs well on its own.
Maybe you can give we a working example or access to your project, so I can help more on debugging this issue.
Hi, thx for the reply, to reproduce the issue juste go to the builder example page ( https://baianat.github.io/vuse/example.html ) -> select theme 1 -> click on go back button ( browser ) and repeat it at least five times, you will see that scroll page became too slow.
After hours of debugging i've found out that the probléme were with "popper.js" which installs listeners on scroll page event, after i've disabled it with the option : eventsEnabled:false, it seems that the problém was solved.
The actual problem here is that the styler instances are not destroyed when routing (you can see they still live in the DOM) so their events will still be active too.
Calling $builder.clear()
it will clear all sections and its styler component.