-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk processing issues #12
Comments
Hey , Can you help me with how to set this up on a windows PC . |
@aavesh1 Sure! I was using Google Chrome when i noticed these problems. Make sure to select a download source with images, that are not optimized too much - just check the file size of a tile. The larger it is, the faster you will encounter the memory issue. Then identify the process of the chrome tab in your task manager (you can see it very easily if you keep zooming in and out on the map, the process should use some CPU power during that). The first problem should be noticeable in the same way, although you might run out of memory before you start noticing that. I hope this helps :) |
can confirm this issue in chrome, ran out of memory. downgrading zoom level is bandaid fix (reduce the number of images downloaded) |
When using the tool for larger tilesets, I ran into some easily fixable issues.
Rendering problems
During downloading the process gets appended in the textarea in the sidebar. This causes lagging until the page reacts very slow or even freezes complitely after some time. The issue here is a very long text inside the textarea.
You can work around it, if you limit the content to a certain length, which can be achived with a small call to a substring function like so:
function logItemRaw(text) {
var logger = $('#log-view');
var value = logger.val() + '\n' + text;
var maxLength = 10000;
if(value.length > maxLength){
value = value.substring(value.length - maxLength, value.length);
}
logger.val(value);
logger.scrollTop(logger[0].scrollHeight);
}
Out of memory
When downloading for longer periods of time, I ran into an issue, where the tab in Chrome crashes, with an 'Out of memory' message. I noticed that the time until this happens it is related to how large the image tiles are.
The problem is that every request with its result (which also contains the base64 tile) is stored in an array but never removed again. This causes a constant memory increase over time.
You can fix this by removing the data from the array, when it is not necessary anymore.
This can be achived by these lines inside the 'always' function of the ajax request:
var removeIndex = requests.indexOf(request);
if(removeIndex >= 0) requests.splice(removeIndex, 1);
The complete part sould look like this:
.always(function(data) {
i++;
removeLayer(boxLayer);
updateProgress(i, allTiles.length);
done();
var removeIndex = requests.indexOf(request);
if(removeIndex >= 0) requests.splice(removeIndex, 1);
if(cancellationToken) {
return;
}
});
All in all I have to say that your tool is great! Not only by getting the job done, but doing it in a beautifully visualized way!
I could watch it download all day long :)
Thanks for publishing it 👍
The text was updated successfully, but these errors were encountered: