re-organize module loading
module loading should be re-organized as follows:
modules should be loaded once on startup, initing a global list of darkroom/lighttable/etc plugins (darkroom are most important).
these modules would then spawn instances (we need to split dt_iop_module_t), which contain all the parameters and gui data.
this is good, because:
- modules would only need to load once, not every time a thumbnail is created (=> faster import)
- we could access trivial stuff (translated plugin names) without creating a develop_t.
#9 Updated by Johannes Hanika about 9 years ago
actually most module->init() (which are now still called for every time an image is entered into develop_t) do dt_opencl_create_kernel calls, which might be slow.
so module->init() and module->cleanup() might be executed only once? or maybe split them into init_global()?
or let module->gui_init() do the image dependent initialization (default enabled and hide_enable_button etc)?
#10 Updated by calca - about 9 years ago
i thinks about default preset.
it's necessary put that preset on library.db?
user can edit/delete preset and anytime DT starts preset will be remove and added. (i understand correctly from the code?)
it's possible create a preset.db on data folder and only read from there on gui_init()?