Organization Chart Demo is not working on slow connections

62 views
Skip to first unread message

Vinay Aggarwal

unread,
Aug 17, 2017, 10:59:30 AM8/17/17
to Google Visualization API
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

Daniel LaLiberte

unread,
Aug 17, 2017, 11:46:57 AM8/17/17
to Google Visualization API
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/a78f5b54-2453-43d2-9531-5098fd4d3866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Daniel LaLiberte

unread,
Aug 17, 2017, 2:33:52 PM8/17/17
to Google Visualization API
I just updated the loader to wait for all the individual packages to load.  It used to only wait for the last one, assuming they would all be loaded by jsloader in the order specified and expecting the Deferred callback would happen after the last file had finished loading.  But I guess that was not entirely reliable because it appears it was using the Deferred from the last file that finished loading, rather than the last file specified.

But I also just discovered that there is a 5 second timeout that applies:  https://github.com/google/closure-library/blob/master/closure/goog/net/jsloader.js#L49  
If any package doesn't finish loading in time, the result will be no callback.    Not sure whether I should add a 'timeout' setting to the loader or just increase the timeout by default, or both.


On Thu, Aug 17, 2017 at 11:46 AM, Daniel LaLiberte <dlali...@google.com> wrote:
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.

On Thu, Aug 17, 2017 at 10:59 AM, Vinay Aggarwal <vinayaggarwal@softwaysolutions.com> wrote:
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
--

Daniel LaLiberte

unread,
Aug 17, 2017, 3:06:48 PM8/17/17
to Google Visualization API
I updated the loader again to increase the timeout to 30 seconds (per file).  That should be enough for everyone but submarines.

Vinay Aggarwal

unread,
Aug 18, 2017, 3:16:09 PM8/18/17
to Google Visualization API
Hi Deniel, Thanks for the quick reply and immediate fix. Looks like charts in my demo app is working on slow connections now. Hopefully it'll work on my production application as well since you have given a long enough timeout.

I am not in a submarines but having connected through VPN and so many security checks on my private network makes feel I'm on one. ;) 

Once again thanks for help. Cheers!

On Friday, August 18, 2017 at 12:36:48 AM UTC+5:30, Daniel LaLiberte wrote:
I updated the loader again to increase the timeout to 30 seconds (per file).  That should be enough for everyone but submarines.
On Thu, Aug 17, 2017 at 2:33 PM, Daniel LaLiberte <dlali...@google.com> wrote:
I just updated the loader to wait for all the individual packages to load.  It used to only wait for the last one, assuming they would all be loaded by jsloader in the order specified and expecting the Deferred callback would happen after the last file had finished loading.  But I guess that was not entirely reliable because it appears it was using the Deferred from the last file that finished loading, rather than the last file specified.

But I also just discovered that there is a 5 second timeout that applies:  https://github.com/google/closure-library/blob/master/closure/goog/net/jsloader.js#L49  
If any package doesn't finish loading in time, the result will be no callback.    Not sure whether I should add a 'timeout' setting to the loader or just increase the timeout by default, or both.

On Thu, Aug 17, 2017 at 11:46 AM, Daniel LaLiberte <dlali...@google.com> wrote:
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.

On Thu, Aug 17, 2017 at 10:59 AM, Vinay Aggarwal <vinaya...@softwaysolutions.com> wrote:
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--



--



--

Vinay Aggarwal

unread,
Aug 21, 2017, 1:41:30 AM8/21/17
to Google Visualization API
Hey Daniel, Can that timeout be configurable, I tried the charts in my production application on IE it's taking little over than 30 seconds and hence not working.


On Friday, August 18, 2017 at 12:36:48 AM UTC+5:30, Daniel LaLiberte wrote:
I updated the loader again to increase the timeout to 30 seconds (per file).  That should be enough for everyone but submarines.
On Thu, Aug 17, 2017 at 2:33 PM, Daniel LaLiberte <dlali...@google.com> wrote:
I just updated the loader to wait for all the individual packages to load.  It used to only wait for the last one, assuming they would all be loaded by jsloader in the order specified and expecting the Deferred callback would happen after the last file had finished loading.  But I guess that was not entirely reliable because it appears it was using the Deferred from the last file that finished loading, rather than the last file specified.

But I also just discovered that there is a 5 second timeout that applies:  https://github.com/google/closure-library/blob/master/closure/goog/net/jsloader.js#L49  
If any package doesn't finish loading in time, the result will be no callback.    Not sure whether I should add a 'timeout' setting to the loader or just increase the timeout by default, or both.

On Thu, Aug 17, 2017 at 11:46 AM, Daniel LaLiberte <dlali...@google.com> wrote:
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.

On Thu, Aug 17, 2017 at 10:59 AM, Vinay Aggarwal <vinaya...@softwaysolutions.com> wrote:
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--



--



--

Daniel LaLiberte

unread,
Aug 21, 2017, 9:53:39 AM8/21/17
to Google Visualization API
I just added a setting called 'timeoutDelay' which you can use to set the timeout delay, in milliseconds.  This will apply to all subsequent load calls until you change the timeoutDelay again.

On Mon, Aug 21, 2017 at 1:41 AM, Vinay Aggarwal <vinayaggarwal@softwaysolutions.com> wrote:
Hey Daniel, Can that timeout be configurable, I tried the charts in my production application on IE it's taking little over than 30 seconds and hence not working.

On Friday, August 18, 2017 at 12:36:48 AM UTC+5:30, Daniel LaLiberte wrote:
I updated the loader again to increase the timeout to 30 seconds (per file).  That should be enough for everyone but submarines.
On Thu, Aug 17, 2017 at 2:33 PM, Daniel LaLiberte <dlali...@google.com> wrote:
I just updated the loader to wait for all the individual packages to load.  It used to only wait for the last one, assuming they would all be loaded by jsloader in the order specified and expecting the Deferred callback would happen after the last file had finished loading.  But I guess that was not entirely reliable because it appears it was using the Deferred from the last file that finished loading, rather than the last file specified.

But I also just discovered that there is a 5 second timeout that applies:  https://github.com/google/closure-library/blob/master/closure/goog/net/jsloader.js#L49  
If any package doesn't finish loading in time, the result will be no callback.    Not sure whether I should add a 'timeout' setting to the loader or just increase the timeout by default, or both.

On Thu, Aug 17, 2017 at 11:46 AM, Daniel LaLiberte <dlali...@google.com> wrote:
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.

On Thu, Aug 17, 2017 at 10:59 AM, Vinay Aggarwal <vinaya...@softwaysolutions.com> wrote:
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
--



--



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Vinay Aggarwal

unread,
Aug 22, 2017, 12:52:04 AM8/22/17
to Google Visualization API
That was really helpful. Thanks for the on time support. Appreciate it.


On Monday, August 21, 2017 at 7:23:39 PM UTC+5:30, Daniel LaLiberte wrote:
I just added a setting called 'timeoutDelay' which you can use to set the timeout delay, in milliseconds.  This will apply to all subsequent load calls until you change the timeoutDelay again.
On Mon, Aug 21, 2017 at 1:41 AM, Vinay Aggarwal <vinaya...@softwaysolutions.com> wrote:
Hey Daniel, Can that timeout be configurable, I tried the charts in my production application on IE it's taking little over than 30 seconds and hence not working.

On Friday, August 18, 2017 at 12:36:48 AM UTC+5:30, Daniel LaLiberte wrote:
I updated the loader again to increase the timeout to 30 seconds (per file).  That should be enough for everyone but submarines.
On Thu, Aug 17, 2017 at 2:33 PM, Daniel LaLiberte <dlali...@google.com> wrote:
I just updated the loader to wait for all the individual packages to load.  It used to only wait for the last one, assuming they would all be loaded by jsloader in the order specified and expecting the Deferred callback would happen after the last file had finished loading.  But I guess that was not entirely reliable because it appears it was using the Deferred from the last file that finished loading, rather than the last file specified.

But I also just discovered that there is a 5 second timeout that applies:  https://github.com/google/closure-library/blob/master/closure/goog/net/jsloader.js#L49  
If any package doesn't finish loading in time, the result will be no callback.    Not sure whether I should add a 'timeout' setting to the loader or just increase the timeout by default, or both.

On Thu, Aug 17, 2017 at 11:46 AM, Daniel LaLiberte <dlali...@google.com> wrote:
Hi Vinay,

Thanks for your report.

It's not just the org chart.  There may be a problem in the loader, in that when loading packages takes "long enough", it doesn't appear to proceed with callbacks after the loading has finished.  No other errors occur, so it might be that the code thinks it is done.  But once loading of the package files is actually finished, if you reload the page, the browser will find the files in a local cache, and then it loads them fast enough.  I don't know what the underlying cause is, but I suspect there might be a bug in the Google Closure jsloader or the way we are using it.

I saw similar problems earlier, when the cache lifetime of the files was very short, but I thought the cause of the problem was that the server was throttling requests.

On Thu, Aug 17, 2017 at 10:59 AM, Vinay Aggarwal <vinaya...@softwaysolutions.com> wrote:
There is very basic issue with Google Organisational chart, that if we try this api on slow connection it does not work. 

Look at the demo given on the documentation page itself.

If you just open up the "Network" panel of chrome and throttle it for "slow 3g" demo wont work. Not sure if it is broken only on latest version. Is it a know issue or is there any workaround of it.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
--



--



--

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.



--
Reply all
Reply to author
Forward
0 new messages