This can speed up the initial import of diplib ~2x. Note that the cost of import is never paid if the user never calls ImageRead (e.g. because they are already using an external library such as imageio).
(Somewhat similar in idea to #127.)
Note that this technically breaks backcompat by removing the hasDIPjavaio and javaioError globals. If keeping them is important, they can still be generated using a module-level __getattr__ (so that again we try to load the jvm only when really needed), just let me know.
This can speed up the initial import of diplib ~2x. Note that the cost of import is never paid if the user never calls ImageRead (e.g. because they are already using an external library such as imageio).
(Somewhat similar in idea to #127.)
Note that this technically breaks backcompat by removing the hasDIPjavaio and javaioError globals. If keeping them is important, they can still be generated using a module-level
__getattr__
(so that again we try to load the jvm only when really needed), just let me know.