smart-on-fhir / growth-chart-app

Other
66 stars 98 forks source link

Print Screen window pop-up very slow on IE #26

Open shriniketsarkar-zz opened 7 years ago

shriniketsarkar-zz commented 7 years ago

The current version of growth chart pops out a window for the print functionality. When the application is run in IE, launching the print window opens up the pop-up but the content is rendered very slowly. This results in the user staring at a blank page for several seconds and sometimes minutes before any UI gets rendered on the screen. This gives the user an impression that the UI is stuck.

The delay ranges from 14 sec to roughly 2mins depending on the number of data points to be drawn on the graphs.

In other browsers this page loads fairly quick.

@nschwertner, @vlad-ignatov Do you see the same behavior while running in IE? IE Version's : IE 10 , 11

nschwertner commented 7 years ago

Just tried it on IE. Indeed, the print page loads very very slowly. Not sure why it behaves this way on IE11. The app was written in 2012-2013 as a proof of concept with support for IE8 in mind and a lot of the functionality being progressively added to the scope. MedAppTech is working on v2 of the application that will, among the others, resolve these issues. This is a grounds up overhaul of the tool including an improved graphics engine. PGC v2 will be available by the end of the year.

shriniketsarkar-zz commented 7 years ago

@nschwertner Its good to hear that there is a version 2 of the app coming. Considering that version2 will not be available until the end of year do you have any improvement ideas to this pint window issue ?

Until now I have attempted to solve this with the following ideas :

  1. Reduced the number of scripts by concatenating them into 1 JS script. This solves the problem where IE supports 8 max concurrent connections to the server.
  2. I have cached some of the static files Ex. GCMenuItemsJSON.txt using localstorage to avoid refetch.
  3. Moved some of the methods like : getStartAgeMos to the print window instead of accessing them from the main window stack.
  4. Attempted to add a loading indicator with a hope that it will show up until the graphs are drawn. But it doesnt, because the drawing of graphs blocks the main thread for several seconds before any of the UI can show up.

So all the above have not really helped much in reducing this slowness in rendering the UI.

I noticed that the graphs drawn on the print screen have a different layout as compared to the graphs on the main window. Questions:

  1. When the app was written, did the physicians want a different layout for the graphs/tables as compared to the main window graphs/tables?
  2. Considering usability did the physicians want to interact with the graphs on the print window?
vlad-ignatov commented 7 years ago

The app on the server needs to be updated. For some reason it does not mach the latest version in GitHub. The print-view page on the server is currently broken and the one in GitHub should be fine - https://github.com/smart-on-fhir/growth-chart-app/blob/master/print-charts.html Any idea who can pull the latest version?

Vlad

On Apr 12, 2017, at 12:14 PM, Shriniket Sarkar notifications@github.com<mailto:notifications@github.com> wrote:

@nschwertnerhttps://github.com/nschwertner Its good to hear that there is a version 2 of the app coming. Considering that version2 will not be available until the end of year do you have any improvement ideas to this pint window issue ?

Until now I have attempted to solve this with the following ideas :

  1. Reduced the number of scripts by concatenating them into 1 JS script. This solves the problem where IE supports 8 max concurrent connections to the server.
  2. I have cached some of the static files Ex. GCMenuItemsJSON.txt using localstorage to avoid refetch.
  3. Moved some of the methods like : getStartAgeMos to the print window instead of accessing them from the main window stack.
  4. Attempted to add a loading indicator with a hope that it will show up until the graphs are drawn. But it doesnt, because the drawing of graphs blocks the main thread for several seconds before any of the UI can show up.

So all the above have not really helped much in reducing this slowness in rendering the UI.

I noticed that the graphs drawn on the print screen have a different layout as compared to the graphs on the main window. Questions:

  1. When the app was written, did the physicians want a different layout for the graphs/tables as compared to the main window graphs/tables?
  2. Considering usability did the physicians want to interact with the graphs on the print window?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/smart-on-fhir/growth-chart-app/issues/26#issuecomment-293629638, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABETag3KZl8c62J7msVlh_0JnTaWFaJaks5rvPhTgaJpZM4M6gSe.

nschwertner commented 7 years ago

Right. I just now updated the hosted copy to the latest code from GitHUB. See if this fixes the issue

vlad-ignatov commented 7 years ago

Nope. It is still the same. For example line 9 is broken here view-source: <view-source:https://sb-apps.smarthealthit.org/apps/growth-chart/print-charts.html>https://sb-apps.smarthealthit.org/apps/growth-chart/print-charts.html https://sb-apps.smarthealthit.org/apps/growth-chart/print-charts.html That file should like this: https://github.com/smart-on-fhir/growth-chart-app/blob/master/print-charts.html https://github.com/smart-on-fhir/growth-chart-app/blob/master/print-charts.html

Vlad

On Apr 12, 2017, at 12:37 PM, Nikolai Schwertner notifications@github.com wrote:

Right. I just now updated the hosted copy to the latest code from GitHUB. See if this fixes the issue

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/smart-on-fhir/growth-chart-app/issues/26#issuecomment-293636786, or mute the thread https://github.com/notifications/unsubscribe-auth/ABETahxbGhg6-y_2Ht3U_Bt4b7pbRHW7ks5rvP3lgaJpZM4M6gSe.

nschwertner commented 7 years ago

Ok, this is the new sandbox. @travistcummings and @amyballard could you help?

amyballard commented 7 years ago

Vlad, I'll get the new sandbox pointed to the latest growth chart tomorrow.

gajen0981 commented 7 years ago

At Boston Children's we currently have this open source version live and we are seeing the same thing of slowness about 5 mins average.

nschwertner commented 7 years ago

Did updating to the latest PGC code (v0.1.2) make any difference in regard to this issue?