try to speed up needs_move(), introduce LazyMsg

This commit is contained in:
Hocuri
2022-03-16 10:50:11 +01:00
parent ac51939c08
commit db0f5ed5a6
6 changed files with 192 additions and 82 deletions

View File

@@ -30,6 +30,7 @@ use crate::sql::Sql;
#[derive(Clone, Debug)]
pub struct Context {
pub(crate) inner: Arc<InnerContext>,
pub disable_needs_move: bool, // TODO just added for some extra profiling info
}
impl Deref for Context {
@@ -157,6 +158,7 @@ impl Context {
let ctx = Context {
inner: Arc::new(inner),
disable_needs_move: false,
};
ctx.sql.open(&ctx, &ctx.dbfile, false).await?;