[PR #6207] [MERGED] Ensure sparse files on windows during download #22593

Closed
opened 2026-04-19 16:25:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6207
Author: @dhiltgen
Created: 8/6/2024
Status: Merged
Merged: 8/6/2024
Merged by: @dhiltgen

Base: mainHead: sparse_win


📝 Commits (1)

  • fc85f50 Ensure sparse files on windows during download

📊 Changes

3 files changed (+28 additions, -0 deletions)

View changed files

📝 server/download.go (+3 -0)
server/sparse_common.go (+9 -0)
server/sparse_windows.go (+16 -0)

📄 Description

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.

Fixes #5852


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/6207 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 8/6/2024 **Status:** ✅ Merged **Merged:** 8/6/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `sparse_win` --- ### 📝 Commits (1) - [`fc85f50`](https://github.com/ollama/ollama/commit/fc85f50a2be9ba8776547de9db02c5373719eb13) Ensure sparse files on windows during download ### 📊 Changes **3 files changed** (+28 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/download.go` (+3 -0) ➕ `server/sparse_common.go` (+9 -0) ➕ `server/sparse_windows.go` (+16 -0) </details> ### 📄 Description 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. Fixes #5852 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 16:25:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#22593