I recently started working at a company that has been using Aurelia for a very long time and our product is dealing with lots of legacy issues. Lately the webapp has been getting very slow as well and I was wondering if there is a way to “hook” into the framework to monitor certain behaviours, such as dirty checking or subscriptions that are not cleaned up, that could lead to performance issues. Something that would not require me going through every single viewModel.
Thanks!
2 Likes
Can you clarify what is slow?
- startup
- change notification (click a button then do something, re-render a list, jump a page route etc…)
If possible, maybe already record the performance flame chart of the slow operation? Over the time, I think a common issue is tons of 3rd party scripts is added and it could wreck the perf of startup if the app loads everything unnecessarily.
For dirty checking, we have this plugin https://github.com/jdanyow/aurelia-computed that should help you detect any dirty checking. You can choose to log if any dirty checker created, or just throw.
1 Like
Adding onto what Binh has already said, one thing I highly recommend is leveraging the oneTime
binding behaviour for your interpolation. For some values, it makes sense to use ${myVal & oneTime}
which tells Aurelia to display the value once and then not bother updating it again.