-
Notifications
You must be signed in to change notification settings - Fork 51
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
CPU multicore optimization #77
Comments
I just discovered that can be opened several instances of the plug-in the same instance of QGis, but this is still a little uncomfortable. |
Hello there, I'm rendering some orthoimages of roads and in my experiments rendering each In my opinion, one possible approach would be just to change the 'layer extent' select-box to check-boxes and fork the instance for each selected extent. The same could be done with the zoom. This would cause a race condition on the source project and the target tiles, some of which may be rendered twice as the layers don't match perfectly on the tile grid. Another way would be to run https://github.com/nextgis/QTiles/blob/master/tilingthread.py#L276 as a stand alone bash call so it could be remote controlled in many computers. PS: Thanks to all the developers of this plugin, it's my first time working with GIS. |
I got a hack version of multithreading working on my end by replacing lines 152:160(the for loop) in tilingthread.py with this:
Change "4" to however many threads you want, if you have an 8/16 core processor for instance. You can't use the regular Pool module because it spawns N processes, and qgis complains that it cannot render images on a different process than the original? TheadPool works, but documentation is missing... I call this a hack because it doesn't integrate with the UI fully. You can see when tiles get finished because that gets called from render(), but when the rendering job finishes it doesn't reset the interface bar, and if you hit cancel it doesn't stop the rendering job. I couldn't figure out how to fix that part and didn't care, since I could just kill the process and start over. If only it was so easy to get it rendering on the GPU... |
I just wanted to note that I was getting issues with mis-rendered tiles when trying to multithread this (#103 ). I've since fixed that. The cause is in All in
In
In
Now in I couldn't figure out an elegant way of deep copying the original |
Hey first-timer, having similar issues with multicore CPU being under-utilised. Blender 3D used to use "placeholder" files for image frames for animation which was handy for crowd-contributed rendering into online storage. Each instance of the Qtiles could pre-check if a tile exists in a folder and skip to an un-rendered one? If someone wanted to update tiles later, they could remove the problem tiles from storage, and re-render them making sure it doesn't attempt to overwrite rendered tiles. |
Hi
I have a GIS workstation having 8 cpu cores and more RAM.
But I constrained to use the same plugin over several instances of QGis in order to obtain a parallel faster calculation of the tiles for same map...
It would be very nice to have a tile calculation for each zoom level distributed to each CPU.
The text was updated successfully, but these errors were encountered: