Closed joelkuiper closed 5 years ago
Perhaps https://github.com/marcoslin/angularAMD can also be of help.
Cool! Although I'm less worried about download size (although we should do a minimize/Closure Compile step in our build process) than I am about the amount of DOM interactions. Especially creating a new scenario is /really/ slow
Weirdly that seems to be due to the GET $workspace/scenarios -- which should be fast...
Yes, something is definitely not working correctly on the server side. Probably the connection pooling.
It’s also slow on the localStorage version though
On 15 Jan 2014, at 17:02, Gert van Valkenhoef notifications@github.com wrote:
Yes, something is definitely not working correctly on the server side. Probably the connection pooling.
— Reply to this email directly or view it on GitHub.
Yes you're right. Initializing the view seems to take upwards of 500ms, which is a bit ridiculous.
The server can also generate some pretty horrid response times, but seemingly only when "cold".
I've started using the angular 1.3 bind-once functionality {{::var}} vs {{var}} and got rid of the old Foundation javascript (in favor of the pure angular directives). This has sped up the client-side a bit. We should still be watching the number of $watchers though, there is a lot going on that doesn't need to be that complicated.
Another thing that has sped up the app a bit is getting rid of the calls to R in the controllers, instead doing them only once when we construct the workspace. This prevents at least one digest cycle.
Switching MathJax to SVG also made sense
We also deferred the angular bootstrap till domReady, this was unnecessary. If you remove the ng-app declaration in HTML you can simply call angular.bootstrap and it will work fine. See https://github.com/drugis/mcda-elicitation-web/blob/develop/app-remote/src/main/webapp/resources/app/js/main.js#L38
This reduces time-to-display quite a bit
We should start to worry about the performance of the (angular.js) client-side. Especially the overview page is slow due to a large amount of bindings.
We could check-out https://github.com/Pasvaz/bindonce for some of the bindings.