Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/core/download_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,14 @@ func (dm *DownloadManager) downloadCallback(item *WorkItem) error {

// Get a string builder from the pool
sbInterface := dm.stringPool.Get()
sb := sbInterface.(strings.Builder)
sb := sbInterface.(*strings.Builder)
sb.Reset()
sb.Grow(entriesCount * 512) // Pre-allocate approximate space

// Build output in memory first
for i, entry := range entriesResponse.Entries {
certIndex := item.Start + int64(i)
fmt.Fprintf(&sb, "%d,%s,%s\n", certIndex, entry.LeafInput, entry.ExtraData)
fmt.Fprintf(sb, "%d,%s,%s\n", certIndex, entry.LeafInput, entry.ExtraData)
}

// Get the built string
Expand Down
Loading