From 4f84b2932068c122c121321a2466a42e15861f24 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Tue, 2 Sep 2025 10:19:37 +0800 Subject: [PATCH] opt: Reduce file information in detail --- utils.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils.go b/utils.go index 170fcdc..6508579 100644 --- a/utils.go +++ b/utils.go @@ -327,7 +327,10 @@ func buildIpldGraph(ctx context.Context, // log.Info(dirNodeMap) var infos []SimplestFileInfo - for _, info := range sfis { + for i, info := range sfis { + if i > 100 { + break + } infos = append(infos, SimplestFileInfo{ Path: info.Path, }) @@ -350,6 +353,9 @@ func buildIpldGraph(ctx context.Context, if _, ok := seen[dir]; !ok { seen[dir] = struct{}{} list = append(list, SimplestFileInfo{Path: dir}) + if len(list) >= 100 { + break + } } }