devlog 20
🐢 We have an error in the publish action. Let’s fix it and rerun it.
🐇 There are two errors. One resulted from forgetting sudo when installing
dependencies. The other was the incorrect name for the OpenSSL library. It should be
libssl-dev instead of openssl-dev. Maybe we can link the command list in
the docs.
🐢 Oops, yes, we should at least keep that in mind.
🐇 I’m checking the most popular crates. getrandom
retrieves a random number from the system. It looks much lighter than the rand
crate.
🦊 We can use once_cell to initialize
XvcEntityCounter. We currently
use Once
for this purpose.
🐇 I don’t think it will provide any better features.
🦊 For that case, yes, no better features. But the interface is something like:
impl<T> OnceCell<T> {
const fn new() -> OnceCell<T> { ... }
fn set(&self, value: T) -> Result<(), T> { ... }
fn get(&self) -> Option<&T> { ... }
}
And this makes, for example, working with XvcRoot much easier. We are passing
Arc<RwLock<XvcRootInner>>> everywhere. This is a heavy price when we only use
it in a read-only manner. We can prevent most of these, when we use a read lock, by using
OnceCell.
🐇 XvcConfig can benefit from this as well. We don’t update the config during runs.
🐢 Why do we want to assign it, though? We currently have a config field in
XvcRootInner, and we get a reference to it with the config() method.
🐇 Ok. Let’s skip this for now. No need to worry before measuring the performance impact.