Skip to content

Commit e12c5bc

Browse files
committed
impv: speed up snapshot download
1 parent ff7ac57 commit e12c5bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

utils/downloader.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func NewDownloader(text, url, dest string) *Downloader {
3535

3636
func (m *Downloader) startDownload() tea.Cmd {
3737
return func() tea.Msg {
38-
const bufferSize = 8192
38+
const bufferSize = 65536
3939

4040
resp, err := http.Get(m.url)
4141
if err != nil {
@@ -75,8 +75,6 @@ func (m *Downloader) startDownload() tea.Cmd {
7575

7676
totalDownloaded += int64(n)
7777
m.current = totalDownloaded
78-
79-
time.Sleep(10 * time.Millisecond)
8078
}
8179

8280
m.done = true

0 commit comments

Comments
 (0)