快速从客户端重命名为服务器 [英] Fast Rename from client to server

查看:78
本文介绍了快速从客户端重命名为服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#客户端应用程序,有时需要在同一个域中的文件服务器上执行数千个专门的文件重命名文件。如果文件

本地驻留在客户端计算机上,则重命名只需几秒钟。

如果文件驻留在文件服务器上,则可以使用一组30,000个文件重命名我需要半小时才能获得
a。


我只是使用File.Move进行重命名。重命名不会将

文件移动到不同的文件夹,它们只是更改文件的名称。


我假设网络延迟每个File.Move调用之间都是

什么会减慢重命名的速度。


有没有办法批量处理所有30,000个File.Move命令到服务器,

而不是一次发送每个文件,以便我不支付每个文件重命名之间的网络延迟的价格?
?或者是否有更好的方法可以加快速度?它需要几乎和在客户端本地工作一样快。

I have a C# client app that sometimes needs to do thousands of specialized
file renames of files on a file server in the same domain. If the files
reside locally on the client machine, the renames take only a few seconds.
If the files reside on the file server, a set of 30,000 file renames may take
a half hour to do.

I''m just using File.Move to do the rename. The renames are not moving the
files to a different folder, they are just changing the name of the file.

I''m assuming that network latency between each of the File.Move calls is
what is slowing the renaming down so much.

Is there a way to batch up all 30,000 File.Move commands to the server,
rather than sending them each one at a time so that I am not paying the price
of the network latency between every single file rename? Or is there a
better way to speed this up? It needs to be almost as fast as doing it
locally on the client.

推荐答案




不,你不能批量生产。


你能在服务器上安装/运行远程程序吗?

您可以将执行发送到远程服务,该服务将在本地执行。


从我的角度来看,这将是实用的解决方案。


-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通局


" Don Curtis" <发******* @ online.nospam>在消息中写道

新闻:8C ********************************** @ microsof t.com ...
Hi,

No, you cannot batch them.

Can you install/run a remote program in the server?
You could send the execution to the remote service which will do it locally.

That would be the practical solution from my point of view.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Don Curtis" <Fa*******@online.nospam> wrote in message
news:8C**********************************@microsof t.com...
我有一个C#客户端应用程序,有时需要在同一个域中的文件服务器上进行数千个专门的文件重命名文件。如果文件
驻留在客户端计算机本地,则重命名只需几秒钟。
如果文件驻留在文件服务器上,则可以使用一组30,000个文件重命名半小时要做。

我只是使用File.Move进行重命名。重命名不会将
文件移动到其他文件夹,它们只是更改文件的名称。

我假设每个File.Move调用之间的网络延迟是什么减慢了重命名的速度。

有没有办法将所有30,000个File.Move命令批量发送到服务器,而不是每个都发送一个命令一段时间,以至于我没有支付每个文件重命名之间的网络延迟的价格?或者有更好的方法可以加快速度吗?它需要几乎与在客户端本地执行它一样快。
I have a C# client app that sometimes needs to do thousands of specialized
file renames of files on a file server in the same domain. If the files
reside locally on the client machine, the renames take only a few seconds.
If the files reside on the file server, a set of 30,000 file renames may
take
a half hour to do.

I''m just using File.Move to do the rename. The renames are not moving the
files to a different folder, they are just changing the name of the file.

I''m assuming that network latency between each of the File.Move calls is
what is slowing the renaming down so much.

Is there a way to batch up all 30,000 File.Move commands to the server,
rather than sending them each one at a time so that I am not paying the
price
of the network latency between every single file rename? Or is there a
better way to speed this up? It needs to be almost as fast as doing it
locally on the client.



这并不容易,因为并非所有服务器是Windows

机器,而且我不确定如何在非windows

平台上编写服务。还有其他方法可以加快速度吗?


Ignacio Machin(.NET / C#MVP)"写道:
That wouldn''t be easy to do because not all of the servers are Windows
machines, and I''m not certain how to write a service on the non-windows
platforms. Is there not some other way to speed this up?

"Ignacio Machin ( .NET/ C# MVP )" wrote:


不,你不能批量他们。

你能在服务器上安装/运行远程程序吗? ?
您可以将执行发送到远程服务,这将在本地执行。

从我的角度来看,这将是实用的解决方案。

-
Ignacio Machin,
ignacio.machin at dot.state.fl.us
佛罗里达州交通局

Don Curtis <发******* @ online.nospam>在消息中写道
新闻:8C ********************************** @ microsof t.com。 ..
Hi,

No, you cannot batch them.

Can you install/run a remote program in the server?
You could send the execution to the remote service which will do it locally.

That would be the practical solution from my point of view.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Don Curtis" <Fa*******@online.nospam> wrote in message
news:8C**********************************@microsof t.com...
我有一个C#客户端应用程序,有时需要在同一个域中的文件服务器上进行数千个专门的文件重命名文件。如果文件
驻留在客户端计算机本地,则重命名只需几秒钟。
如果文件驻留在文件服务器上,则可以使用一组30,000个文件重命名半小时要做。

我只是使用File.Move进行重命名。重命名不会将
文件移动到其他文件夹,它们只是更改文件的名称。

我假设每个File.Move调用之间的网络延迟是什么减慢了重命名的速度。

有没有办法将所有30,000个File.Move命令批量发送到服务器,而不是每个都发送一个命令一段时间,以至于我没有支付每个文件重命名之间的网络延迟的价格?或者有更好的方法可以加快速度吗?它需要几乎与在客户端本地执行它一样快。
I have a C# client app that sometimes needs to do thousands of specialized
file renames of files on a file server in the same domain. If the files
reside locally on the client machine, the renames take only a few seconds.
If the files reside on the file server, a set of 30,000 file renames may
take
a half hour to do.

I''m just using File.Move to do the rename. The renames are not moving the
files to a different folder, they are just changing the name of the file.

I''m assuming that network latency between each of the File.Move calls is
what is slowing the renaming down so much.

Is there a way to batch up all 30,000 File.Move commands to the server,
rather than sending them each one at a time so that I am not paying the
price
of the network latency between every single file rename? Or is there a
better way to speed this up? It needs to be almost as fast as doing it
locally on the client.




嗨Don,


另一个考虑因素是你需要更改这么多文件名的原因。你可以在你的应用程序中做一些文件名映射吗?你只需更改映射哈希值中的

关系,不要更改真实文件名。


HTH,

Ryan


" Don Curtis" <发******* @ online.nospam> D'è?óê?t

新闻:8C ******************************** ** @ microsof t.com ...
Hi Don,

Another consideration is why you need change so many file names. Can you do
some file name mapping in your application? You just change the
relationship in the mapping hash and do not change real file name.

HTH,
Ryan

"Don Curtis" <Fa*******@online.nospam> D′è?óê?t
news:8C**********************************@microsof t.com...
我有一个C#客户端应用程序,有时需要在同一个域中的文件服务器上进行数千个专门的文件重命名文件。如果文件
驻留在客户端计算机本地,则重命名只需几秒钟。
如果文件驻留在文件服务器上,则一组30,000个文件重命名可能需要半小时要做。

我只是使用File.Move进行重命名。重命名不会将
文件移动到其他文件夹,它们只是更改文件的名称。

我假设每个File.Move调用之间的网络延迟是什么减慢了重命名的速度。

有没有办法将所有30,000个File.Move命令批量发送到服务器,而不是每个都发送一个命令一段时间,以至于我不支付每个文件重命名之间的网络延迟的
价格?或者有更好的方法可以加快速度吗?它需要几乎与在客户端本地执行它一样快。
I have a C# client app that sometimes needs to do thousands of specialized
file renames of files on a file server in the same domain. If the files
reside locally on the client machine, the renames take only a few seconds.
If the files reside on the file server, a set of 30,000 file renames may take a half hour to do.

I''m just using File.Move to do the rename. The renames are not moving the
files to a different folder, they are just changing the name of the file.

I''m assuming that network latency between each of the File.Move calls is
what is slowing the renaming down so much.

Is there a way to batch up all 30,000 File.Move commands to the server,
rather than sending them each one at a time so that I am not paying the price of the network latency between every single file rename? Or is there a
better way to speed this up? It needs to be almost as fast as doing it
locally on the client.



这篇关于快速从客户端重命名为服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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