preprocessing stages should be handled by a single isolate
brendan-duncan opened this issue · 0 comments
brendan-duncan commented
Preprocessing stages include:
- Render tasks such as CreateProbesRenderer and SurfacePointsRenderer
- Integrator and Material preprocess functions such as PhotonMapIntegrator and DipoleSubSurfaceMaterial
There currently isn't a way to have multiple isolates split up the work of these proprocessing stages. A single isolate should compute these and send the results as a resource to the controller isolate; other isolates should skip preprocessing, wait until those resources are ready, then continue rendering the image as is currently being done (by splitting the image and rendering a portion).
Alternatively, the isolate multi-processing model could be re-written to be more micro-task based.
As of now, using more than N isolates will have each isolate do preprocessing, a waist of CPU resources.