Quote:
Originally Posted by Best Coder 2014
Nice work, but why not just use  ?
|
Honestly, because of a bad test i did some months ago, i used to think that the Parallel class may be quite slow, just noticed i was totally wrong

, so it's probably that i would have used the Task.Parallel class then.
Did a quick test using Parallel.ForEach.
Convert to tmap: 18.5 secs
Load tmaps: 1.8 secs load
Generate png images: 44.8
Also, noticed that some maps are using the same DMap file, this may throw an exception because of multiple threads are accessing to the same file when converting the DMaps (i ignored these maps for this test), that is why i added the queue, i know that FileStreams can support this, but will be a bit slower (again, based on an old test i did), and would have to find a way to do this using the Task.Parallel class.
Probably i will add an option to save the maps by name instead of Id, so no repeated maps with different Id would be stored, then i surely will use the Task.Parallel class, and possibly support to convert only missing dmap files instead of deleting the folder and convert all the dmaps again.