Merge pull request #28272 from Microsoft/jjh/sequentialscan2

Windows: Perf: Use sequential file access
This commit is contained in:
Sebastiaan van Stijn
2016-11-16 00:47:19 +01:00
committed by GitHub
+4 -2
View File
@@ -3,13 +3,13 @@ package image
import (
"fmt"
"io"
"os"
"golang.org/x/net/context"
"github.com/docker/docker/cli"
"github.com/docker/docker/cli/command"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/system"
"github.com/spf13/cobra"
)
@@ -43,7 +43,9 @@ func runLoad(dockerCli *command.DockerCli, opts loadOptions) error {
var input io.Reader = dockerCli.In()
if opts.input != "" {
file, err := os.Open(opts.input)
// We use system.OpenSequential to use sequential file access on Windows, avoiding
// depleting the standby list un-necessarily. On Linux, this equates to a regular os.Open.
file, err := system.OpenSequential(opts.input)
if err != nil {
return err
}