大幅提升缓存索引性能

This commit is contained in:
GoEdgeLab
2022-08-20 11:47:57 +08:00
parent 14d6d8e509
commit 3a83af8e2b
6 changed files with 224 additions and 51 deletions

View File

@@ -361,19 +361,6 @@ func TestFileList_UpgradeV3(t *testing.T) {
t.Log("ok")
}
func TestFileList_HashList(t *testing.T) {
var list = caches.NewFileList(Tea.Root + "/data/cache-index/p1")
err := list.Init()
if err != nil {
t.Fatal(err)
}
prefixes, err := list.(*caches.FileList).FindAllPrefixes()
if err != nil {
t.Fatal(err)
}
t.Log(len(prefixes))
}
func BenchmarkFileList_Exist(b *testing.B) {
var list = caches.NewFileList(Tea.Root + "/data/cache-index/p1")
err := list.Init()