mirror of
https://github.com/ollama/ollama.git
synced 2025-08-03 23:36:14 +02:00
Ensure sparse files on windows during download
The file.Truncate call on windows will write the whole file unless you set the sparse flag, leading to heavy I/O at the beginning of download. This should improve our I/O behavior on windows and put less stress on the users disk.
This commit is contained in:
9
server/sparse_common.go
Normal file
9
server/sparse_common.go
Normal file
@@ -0,0 +1,9 @@
|
||||
//go:build !windows
|
||||
|
||||
package server
|
||||
|
||||
import "os"
|
||||
|
||||
func setSparse(file *os.File) error {
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user