Open
Description
The SciJava Context
and Services
have been diligent about lazy initialization to optimize startup speeds. However, this can delay performance hits, leading to perceivable performance drops the first time various functions are invoked.
Thus we should provide a Context.preload
method that performs an initialize
-style function across all Services
. This allows it to be opt-in both at the Service
implementation level, and Context
consumption level (e.g. developers could choose to make a Context
and not call preload
).
The actual preload
implementations should perform necessary construction and caching on a dedicated thread to mitigate visible performance problems for users.