The source code uses a technique called "preloading", whereby it stores various arrays in memory which do not change during a lens model fit. For example, if all lens light parameters are fixed, the lens light emission does not change and it can be stored in memory (including with PSF convolution) in order to speed up the likelihood function.
However, this introduces a lot of code complexity and has caused strange bugs in the past. My hope is that with JAX the speed will be so fast preloading is pointless.
This PR removes preloading from the source code, which should simplify JAX development.
The source code uses a technique called "preloading", whereby it stores various arrays in memory which do not change during a lens model fit. For example, if all lens light parameters are fixed, the lens light emission does not change and it can be stored in memory (including with PSF convolution) in order to speed up the likelihood function.
However, this introduces a lot of code complexity and has caused strange bugs in the past. My hope is that with JAX the speed will be so fast preloading is pointless.
This PR removes preloading from the source code, which should simplify JAX development.