My Vue.js application has grown to be quite large with over 80 .vue components. Users have been complaining about their phone batteries draining quickly and Safari displaying a "This webpage is using significant energy..." warning.
I have tried investigating the issue by using the performance tab in Chrome and Lighthouse, but I haven't been able to pinpoint the problem.
There are a few areas that I suspect may be contributing to the battery drain:
I rely heavily on watchers in Vuex to monitor state changes, as passing information between components would be too labor-intensive. This has resulted in a large store.js file with numerous variables used throughout the application.
I use computed properties frequently
I have multiple event listeners for events like window resizing