The main goals of this change is faster starting with foreground
rendering. User will be able to continue working when new kernels are
needed.
This patch will build optimized kernels during the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used for foreground/interactive mode.
These AO kernels are really fast to compile (3-7 seconds) and can be
reused by all scenes. When the optimized kernals become available we
will switch to these optimized kernels.
When adding features to the scene that required recompilation of the
optimized kernels we switch back to the AO kernels until the new
optimized kernels become available.
In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.