this is one of the ("simple") but possibly effective solutions to improve startup performance. hilbish would lazy load its native modules and interfaces on demand instead of loading and setting up all of them.
for native modules, this could be implemented in lua with a native helper function.
hilbish.load(module) would load a native module on demand. the lua side can add a package searcher(?) or similar mechanism with the require function to load them up when required.
for interfaces, this would be wholly go supported. the hilbish table already has a proxy metatable to make sure overrides dont happen so that can just be used to automatically load known interfaces.
turns out it is not effective, as the time difference is miniscule. i branched out the attempts (lazy-interfaces branch) so maybe i can come back to it? otherwise, not worth
this is one of the ("simple") but possibly effective solutions to improve startup performance. hilbish would lazy load its native modules and interfaces on demand instead of loading and setting up all of them.
for native modules, this could be implemented in lua with a native helper function.
hilbish.load(module)
would load a native module on demand. the lua side can add a package searcher(?) or similar mechanism with the require function to load them up when required.for interfaces, this would be wholly go supported. the hilbish table already has a proxy metatable to make sure overrides dont happen so that can just be used to automatically load known interfaces.