You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I observed that running openseadragon on python Flask server has an issue, when the initial load of the navigating button happens.
The GET requests toward the server are sent parallel apparently, and sometimes the server is not able to respond them.
Which results in displaying the alternate text, instead of the proper image button.
I added a workaround, to delay the fetch of the image buttons as follows:
makeTransparentImage: function(e) {
var t = u.makeNeutralElement("img");
// add this extra while loop for 20msec syncrhonous delay:
let datetime1 = new Date().getTime();
let datetime2 = datetime1 + 20;
while (datetime1 < datetime2) {
datetime1 = new Date().getTime();
}
// delay finished, continue with image fetch:
t.src = e;
return t
},
This workaround helped, and the server was able to answer properly the requests arriving in a more paced way.
To handle the issue, I propose some new viewer option (similar to the existing "imageLoaderLimit"), which can configure the delay between the button image loading requests, in case of slow servers.
The text was updated successfully, but these errors were encountered:
Does your server also have trouble serving the image tiles in time? Or is that fine because they are loaded one at a time?
This is the first I've heard of this issue, so I don't know how widely-used such a feature would be. If you want to pursue adding it, though, I can help point you in the right direction. If nothing else, this issue report can be helpful to others who encounter the same problem; thank you for reporting it!
Hi iangilman.
Yes, i had issues with the tile loading as well, until i set the "imageLoaderLimit" option to value 1.
But it is only affects the tile loading.
To fix the button image loading issue also, i had to introduce the workaround with the 20msec deley.
To solve the issue caused by the slow python Flask web server, I introduced a NGINX proxy in front of the python Flask server.
This NGINX proxy is configured to serve the static content (tiles, openseadragon artifact, eg. button images, script etc.), and everything else which is dynamic content is proxied to the python Flask server.
As NGINX has good performance in serving static content, the Flask server load decreased a lot, it only serves the absolute neccesary.
This hybrid setup works fine.
Going back to the original topic:
Despite that the problem is solved by a workaround, but:
for such situations, where this traffic offloading from the low performance server is not an option, the configurable concurrency and/or time pacing would be still a useful feature in openseadragon.
I observed that running openseadragon on python Flask server has an issue, when the initial load of the navigating button happens.
The GET requests toward the server are sent parallel apparently, and sometimes the server is not able to respond them.
Which results in displaying the alternate text, instead of the proper image button.
I added a workaround, to delay the fetch of the image buttons as follows:
This workaround helped, and the server was able to answer properly the requests arriving in a more paced way.
To handle the issue, I propose some new viewer option (similar to the existing "imageLoaderLimit"), which can configure the delay between the button image loading requests, in case of slow servers.
The text was updated successfully, but these errors were encountered: