Reducing Internet Viewer Load Time Suggestion

The "to-do" list for Virtual Radar Server is as long as my arm, but if you want to pile more work onto it then this is for you.
Post Reply
paradiselost
Posts: 101
Joined: Sun Apr 06, 2014 10:22 am
Location: Philippines

Reducing Internet Viewer Load Time Suggestion

Post by paradiselost » Tue Nov 24, 2015 10:41 pm

Those of us that consolidate several feeds for display for internet users experience are encountering user timeout issues when they load or reload our sites even though we are using compression. Browsers are not good at updating tabs that are not the focus and just access the cache copy of the page as it was last time it was the focus.

A possible explanation is that VRS jsonifies the operator BMPs and silhouettes on demand delaying the loading time of the internet user.

A possible solution to reducing VRS server load and internet user loading time is to jsonify the operator bmps and the silhouettes bmps during the VRS install process and pointing to the folder where the resulting pngs will reside instead of converting them on the fly.

Perhaps this would also speed up the population of the thousands of logos in the reports when all rows are selected.

paradiselost
Working Example of Version 2 Beta Virtual Radar Server http://dgteflyovers.ddns.net/virtualradar/
VRS 2 Help Files http://dgteflyovers.ddns.net:8080

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Reducing Internet Viewer Load Time Suggestion

Post by agw » Sun Nov 29, 2015 2:58 pm

Not sure what you mean by JSONifying a bitmap, JSON is the text representation of JavaScript objects, it doesn't have anything to do with images. However, what I think you're saying is that the server should convert all of the flags and silhouettes into PNGs, cache the resulting PNGs on disk and have the site point at those instead of having ImagePage.cs load and serve BMPs on the fly?

The browser caches flags and silhouettes, it only asks for each flag or silhouette once an hour. Converting the BMPs to PNG files wouldn't make any significant improvement to page load time and would only slightly improve server load during a page fetch, but at the expense of increasing server load when it has to create PNGs for all of the flags and silhouettes that it can find before it can start serving any pages.

The behaviour you're describing here:
paradiselost wrote:Browsers are not good at updating tabs that are not the focus and just access the cache copy of the page as it was last time it was the focus.
I think what you might be describing here is the behaviour of some mobile OS browsers where JavaScript processing is suspended for the page when the tab goes into the background. When you return to the tab the site looks the same as it did when you switched away from it. Once the JavaScript resumes processing the aircraft suddenly jump to where they are now in a single jarring update.

There isn't anything that can be done about this, you can't tell the browser to keep running the site's JavaScript while it's in a background tab.

paradiselost
Posts: 101
Joined: Sun Apr 06, 2014 10:22 am
Location: Philippines

Re: Reducing Internet Viewer Load Time Suggestion

Post by paradiselost » Mon Nov 30, 2015 11:56 pm

agw wrote:Not sure what you mean by JSONifying a bitmap, JSON is the text representation of JavaScript objects, it doesn't have anything to do with images. However, what I think you're saying is that the server should convert all of the flags and silhouettes into PNGs, cache the resulting PNGs on disk and have the site point at those instead of having ImagePage.cs load and serve BMPs on the fly?

The browser caches flags and silhouettes, it only asks for each flag or silhouette once an hour. Converting the BMPs to PNG files wouldn't make any significant improvement to page load time and would only slightly improve server load during a page fetch, but at the expense of increasing server load when it has to create PNGs for all of the flags and silhouettes that it can find before it can start serving any pages.
The suggestion was only to do it when the server is set up and not have to do it on the fly.
The behaviour you're describing here:
paradiselost wrote:Browsers are not good at updating tabs that are not the focus and just access the cache copy of the page as it was last time it was the focus.
I think what you might be describing here is the behaviour of some mobile OS browsers where JavaScript processing is suspended for the page when the tab goes into the background. When you return to the tab the site looks the same as it did when you switched away from it. Once the JavaScript resumes processing the aircraft suddenly jump to where they are now in a single jarring update.

There isn't anything that can be done about this, you can't tell the browser to keep running the site's JavaScript while it's in a background tab.
Chrome desktop and Firefox do the same switching tabs.

paradiselost
Working Example of Version 2 Beta Virtual Radar Server http://dgteflyovers.ddns.net/virtualradar/
VRS 2 Help Files http://dgteflyovers.ddns.net:8080

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Reducing Internet Viewer Load Time Suggestion

Post by agw » Tue Dec 01, 2015 10:24 am

paradiselost wrote:Chrome desktop and Firefox do the same switching tabs.
They don't on any of my desktops. Perhaps you have a plugin installed that suspends background tabs, e.g. https://chrome.google.com/webstore/deta ... nakg?hl=en?

paradiselost
Posts: 101
Joined: Sun Apr 06, 2014 10:22 am
Location: Philippines

Re: Reducing Internet Viewer Load Time Suggestion

Post by paradiselost » Wed Dec 02, 2015 10:09 pm

I solved the delay updating the tab on 64 bit operating system machines by replacing the 32 bit version of Chrome with the 64 bit version. The 64 bit Chrome renders pages by a factor of 2 times faster. On the replacement, Chrome is still in program files x86 directory but works 64 bit.

Internet viewers running 32 bit Chrome on 64 bit OS will still experience the the initial delay leading to killing the process and reloading.

Perhaps when Google builds detector code into the install process to install the correct version this problem will go away. As it is now if you initially installed 32 bit version, updates will just update that version. Google's legacy testers may never be aware of the version they have installed.

On my initial topic my suggestion to consider replacing the on the fly icon conversion with an initial conversion of all the icons in the folder would only impact server clock cycles when VRS is installed and not when the viewer loads the page because all the conversion has been done already.

paradiselost
Working Example of Version 2 Beta Virtual Radar Server http://dgteflyovers.ddns.net/virtualradar/
VRS 2 Help Files http://dgteflyovers.ddns.net:8080

Post Reply