-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the blocktree storage #11773
Comments
能提高启动速度吗? |
有兴趣由 SQLite 切换到DuckDB。 |
能,不过提升有限。这个改进主要还是提升稳定性,避免之前定时落盘的风险。 |
应该也能降低内核退出概率 |
尝鲜了一下,启动速度快挺多🤩 |
感觉启动是快了,日常编辑卡了不少,特别是刷闪卡的时候(1000张左右),怎么点都没反应。换到上一版dev就没事,其他条件都一样 |
安卓端好像反而更慢了 |
@AvoidantPerDis 打开开发者工具看看是哪个请求卡,另外还需要提供一下内核日志。 |
|
卡了能有1分钟 |
@AvoidantPerDis |
我刚刚关掉插件自查了一下,应该是番茄的闪卡优先级插件导致的,不过优先级我刚需 |
之前出现过读写接口都串行,后来把只限制了写接口。现在看起来好像读接口也串行了。 来个批量属性查询的接口可以缓解。 #11786 |
|
这个应该也可以用到以后闪卡的不同flag排序
|
改进了一些性能,等新版本发布后各位帮忙测试看看。 |
关联列搜索好像变卡了 |
录屏看下请求耗时 |
好像是最新dev的事,之前dev没有,而且整体都比较卡 |
那应该不是 dev7 改动导致的,dev7 没有做过相关改动。 不过刚刚找到一个细节优化点,等 dev8 再测测,谢谢。 |
感觉多页签的情况还是可以优化的,最近期末周开好几个大文档,都不敢开侧边的大纲面板了 |
看了下blocktree.db的内容,似乎都是blocks里已有的内容?为啥要单独存一份? |
帮忙测试下只用主库的性能。
…---Original---
From: ***@***.***>
Date: Fri, Jul 12, 2024 18:49 PM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [siyuan-note/siyuan] Refactor the blocktree storage (Issue#11773)
看了下blocktree.db的内容,似乎都是blocks里已有的内容?为啥要单独存一份?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
@zxhd863943427 对了,有个重要原因就是 blocks 是异步写入的,存在较大延迟,而 blocktree 要求即时写入,所以不能直接用 blocks 库表。 |
重构块树存储
动机
之前的块树存储结构是自己实现的文件存储,通过散列分散在 256 个 msgpack 文件中,启动时从这些文件加载块树到内存中,并每隔 5s 将变更的块树写入文件。
目前遇到的问题:
方案
从散列存储 msgpack 文件(工作空间/temp/blocktree/00-ff.msgpack)改为使用 SQLite 存储(工作空间/temp/blocktree.db)。
这样能解决前面提到的问题:
The text was updated successfully, but these errors were encountered: