Skip to content

改进块树数据存取 #7168

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

Closed
88250 opened this issue Jan 26, 2023 · 3 comments
Closed

改进块树数据存取 #7168

88250 opened this issue Jan 26, 2023 · 3 comments
Assignees
Milestone

Comments

@88250
Copy link
Member

88250 commented Jan 26, 2023

之前使用单个文件存储块树数据(blocktree.msgpack)在块较多的情况下序列化保存较慢,且内存使用会较高,改进为散列存储在 temp/blocktree/ 文件夹下。

@88250 88250 added this to the 2.7.1 milestone Jan 26, 2023
@88250 88250 self-assigned this Jan 26, 2023
88250 added a commit that referenced this issue Jan 26, 2023
88250 added a commit that referenced this issue Jan 26, 2023
@88250 88250 closed this as completed Jan 26, 2023
88250 added a commit that referenced this issue Jan 26, 2023
88250 added a commit that referenced this issue Jan 26, 2023
@aptexd
Copy link

aptexd commented Jan 26, 2023

“建议”用链表和数组的存贮结构,冲突时候用红黑树,不行再多加几个“桶”,并行操作🤣

@aptexd
Copy link

aptexd commented Jan 26, 2023

说到散列,想起之前路径过长的麻烦问题,当时就想:说不定可以将 .sy 文件也散列话存储呢,路径存在 .sy 文件中,依据路径进行散列,这样实际路径固定且变短,就彻底且跨平台解决文件路径问题了

@88250
Copy link
Member Author

88250 commented Jan 27, 2023

@aptexd 这部分现在最好还是不改了,将可读路径存放之前也考虑过,弊端是移动的时候可能需要批量更新大量文件和索引。

88250 added a commit that referenced this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants