We have an issue when we insert a map into a non-visible area (ie. below the manifold) the map loads slow (it seems like it does not start to load the map until the map is scrolled into a visible area). If you look closely you can actually see the map below a white slighty visible layer, but it takes up to 5 seconds for it to become visible after scrolling it into the visible area.
If we insert the map at the top it is loaded almost instantly. Is there any logic that delays the load until the map becomes visible and if so, is there any way to disable it?
Only maps that can be viewed by the user are rendered, this is so that many, even thousands of maps can be present on the page (Maybe they are available via a tab or drop down list selector) and only those that require resources then take resources. This also allows the page load time to be as fast as possible for the current view port. These are all positive things.
If, for some reason, you don't want this, there is a flag you can set to disable active monitoring, though it will also stop the map responding to other events like the browser being resized.
Is visibility detected at scroll or at a given time interval? Because sometimes the maps loads fast when you scroll to the map and sometimes it takes like 5 seconds. In other words it seems like sometimes you are lucky and it is detected right away and sometimes it takes longer to detect that the map frame has become visible.
Also we are inserting maps using the Grid Editor component, is it possible to disable active monitoring for those maps?
I'm facing the same issue, did you managed to find the solution?
At Jonathan, is there any work around that i can do to make this better? Or if it possible to put something like a loader within that 5 seconds before it is visible rather than showing the while blank screen?
Currently the poll speed is 100 milliseconds, this is how often it tries to detect changes to a particular map. If there are two maps present (they don't need to be on display) then only one map is checked each poll. If there are 50 maps present then there could be a delay of 5 seconds (100 milliseconds x 50 = 5 seconds) before a particular map is updated. This is intentional, as more processing will overload the browser.
Feel free to find the file on your installation, change the value and compile a new minified version.
Just note this 100 milliseconds was chosen for those with out-of-date browsers running on slow mobile devices.
I changed the _poll and replace the renderer.min.js with the new compiled minified, but i'm now getting this error
"Could not load file or assembly 'System.Reactive.Linq' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)"
Map loads slow when not in visible area
Hello Jonathan
We have an issue when we insert a map into a non-visible area (ie. below the manifold) the map loads slow (it seems like it does not start to load the map until the map is scrolled into a visible area). If you look closely you can actually see the map below a white slighty visible layer, but it takes up to 5 seconds for it to become visible after scrolling it into the visible area.
If we insert the map at the top it is loaded almost instantly. Is there any logic that delays the load until the map becomes visible and if so, is there any way to disable it?
Hi Christain,
Yes this is deliberate.
Only maps that can be viewed by the user are rendered, this is so that many, even thousands of maps can be present on the page (Maybe they are available via a tab or drop down list selector) and only those that require resources then take resources. This also allows the page load time to be as fast as possible for the current view port. These are all positive things.
If, for some reason, you don't want this, there is a flag you can set to disable active monitoring, though it will also stop the map responding to other events like the browser being resized.
Cheers
Jonathan
Hello Jonathan,
It makes sense, it's just a problem when it sometimes takes up to 5 seconds for the map to actually be rendered when its "viewport" becomes visible.
I already stumbled upon the option to disable DomMonitor, but was not too happy about breaking events that handled resizing etc.
Hello Jonathan
Is visibility detected at scroll or at a given time interval? Because sometimes the maps loads fast when you scroll to the map and sometimes it takes like 5 seconds. In other words it seems like sometimes you are lucky and it is detected right away and sometimes it takes longer to detect that the map frame has become visible.
Also we are inserting maps using the Grid Editor component, is it possible to disable active monitoring for those maps?
Hi Chris,
I'm facing the same issue, did you managed to find the solution?
At Jonathan, is there any work around that i can do to make this better? Or if it possible to put something like a loader within that 5 seconds before it is visible rather than showing the while blank screen?
Thanks in advance
Regards,
Advance
Hi Advance,
https://github.com/Joniff/Terratype/blob/master/src/Core/Terratype/App_Plugins/Terratype/Scripts/terratype.renderer.js#L4
Currently the poll speed is 100 milliseconds, this is how often it tries to detect changes to a particular map. If there are two maps present (they don't need to be on display) then only one map is checked each poll. If there are 50 maps present then there could be a delay of 5 seconds (100 milliseconds x 50 = 5 seconds) before a particular map is updated. This is intentional, as more processing will overload the browser.
Feel free to find the file on your installation, change the value and compile a new minified version.
Just note this 100 milliseconds was chosen for those with out-of-date browsers running on slow mobile devices.
Cheers
Jonathan Richards
Thanks Jonathan,
Sorry for being dump, how can i compile to a new minified version. I managed to change the poll, but it is not working.
Cheers,
Hi Advnace
https://javascript-minifier.com/
Cheers
Jonathan Richards
Hi Jonathan,
I changed the _poll and replace the renderer.min.js with the new compiled minified, but i'm now getting this error
"Could not load file or assembly 'System.Reactive.Linq' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)"
What did i do wrong?
Hi Advance,
Never heard of System.Reactive.Linq, a quick google search says it this
https://github.com/dotnet/reactive
This has nothing to do with Umbraco or Terratype.
I might guess you haven't minified the file correctly, but otherwise you are own as you have something very non-standard going on with your setup.
Cheers
Jonathan Richards
Hi Jonathan,
Thanks for the help, it is now much better.
Regards,
Advance
Hi Jonathan,
I've inherited an old site, been having the same issue.
ive' tried to use the below
But it slow things even further.
I've noticed that the map marker seems to load right away, but the map itself seems to only draw once you're on the visible area which takes 5s.
Any other way to just want it to load right away?
ive even tried to amend the poll settings to 10ms in the below file too /app_plugins/terratype/scripts/terratype.renderer.js file
is working on a reply...