bgnerdclub / birb

6 stars 0 forks source link

Registry Module #2

Closed camsoftworks2018 closed 6 months ago

camsoftworks2018 commented 6 months ago

Feel free to deny the PR if the module should be updated to fit jake's logging module and maybe a future 'per module' virtual filesystem module

camsoftworks2018 commented 6 months ago

tests run fine, Give the code a look and absolutely give me pointers on how to do better.

Marked draft as i think ill utilize jake's logging module instead of panicking when filesystem funkies happen

mavic7 commented 6 months ago

Please bear with while I inspect this module and let you know whether it'll work with the logging. I have only implemented local module name translation in the logging module for testing so I expect to be flexible with registry

jw2476 commented 6 months ago

Thanks for renaming, the CI isn't going to work for a while since the core engine uses an unstable feature and the GH action only does stable rust afaik, from what I hear the feature will be stabilized on December 28th 🤞

Alex-Programs commented 6 months ago

Agreed on giving users control over saving. We should probably move it to be run outside of the core engine loop at some point - just dispatch to another thread with a clone of the data and have some handling for a new save() when one is partway through - IO has high latency and we don't want to be slowing things down.

May also be worth looking into progressive/diff based saving depending on how large the registry is going to get. This could be implemented as simply as giving each key its own file and letting the FS handle it.

jw2476 commented 6 months ago

The modules system is already multithreaded so I doubt moving it to a separate thread would do much. For now lets just get this merged and we can continue to iterate with improvements such as #9 after

Alex-Programs commented 6 months ago

Agreed, let's solve perf issues as they arise.