访问 Windows 7 网络共享上的文件的更快方法? [英] Faster way to access a file on a Windows 7 network share?

查看:27
本文介绍了访问 Windows 7 网络共享上的文件的更快方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 7 机器上访问网络共享时存在间歇性速度问题,这会破坏我的程序运行.基本上,当我的程序第一次尝试访问网络共享时,在访问发生之前有 7 秒的延迟.随后会立即尝试访问该文件.但是时不时不重启,问题又来了.

There is an intermittent speed issue with accessing network shares on a Windows 7 machine that ruins the functioning of my program. Basically, when my program first attempts to access the network share, there is a 7-second lag before the access takes place. Subsequent attempts to access the file occur instantly. But every now and again without restarting, the problem strikes again.

这个问题也出现在资源管理器中,这让我相信这是一个 Windows 配置问题.但是,我尝试了我能找到的所有技术(禁用自动调整和 rss、关闭远程差分压缩、取消选择 IPv6 和 QoS 等),但都没有解决资源管理器中的延迟问题.

The problem occurs in Explorer as well, which led me to believe it was a Windows configuration issue. However, I tried every technique I could find (disabling auto-tuning and rss, turning off Remote Differential Compression, deselecting IPv6 and QoS, etc.) but it did not fix the lag in Explorer.

这似乎是 Win7 中的一般网络问题,但我想知道是否有任何 C# 程序员找到了以某种方式消除这种滞后的更智能的文件访问方法.我在想,也许 Explorer 会尝试做一些额外的索引、驱动器定位等,这会减慢它的速度.我希望 C# 中可能有一个文件访问过程(关闭一个或两个标志或其他东西),这将帮助我无延迟地访问文件.

This seems to be a general networking issue in Win7, but I was wondering if any C# programmers had found smarter ways to access files that somehow eliminated this lag. I was thinking that perhaps Explorer tries to do a little extra indexing, drive-locating etc. that slows it down. I was hoping there might be a file access procedure in C# (turning off a flag or two or something), that will help me access the file without lag.

是否有更快的方法来访问 Windows 7 网络共享上的文件?

Is there a faster way to access a file on a Windows 7 network share?

推荐答案

问题在于 nslookup 需要一段时间来解析名称.直接使用网络驱动器的 IP 而不是使用名称解决了问题.我们可能最终会将所有地址放在 Windows 的主机文件 (system32\drivers\etc) 中.

The issue was with nslookup taking a while to resolve the name. Using the IP of the network drive directly instead of using the name fixed the problem. We will probably end up putting all our addresses in the hosts file (system32\drivers\etc) for Windows.

这篇关于访问 Windows 7 网络共享上的文件的更快方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆