Closed ApanLoon closed 5 years ago
Commit 87a6ea4 seems to not crash the UI thread. It loops over all blocks in a BackgroundWorker thread and that schedules creation of 3D models for blocks in batches of 100 at a time by the UI thread. It seems as if the UI thread still won't handle any other events before all 3D models are created.
I am a bit at a loss here, I don't know the best way to do multi-threading, especially not in WPF/MVVM. Do you, @PeteMichaud, know about this sort of thing?
Fantastic. Just as I posted the question, I found an answer that might be correct. Funny how that happens so often.
Fixed by pull request #55
There is a bottle neck in the BuildModel method - System.Windows.Media.Media3D.GeometryModel3D.set_Material appears to take an disproportionate amount of time. Excessive GC calls happen when this method is executing as well.