Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

i need to copy multi-page (tiff) files to a remote NAS storage, and split each tiff into separate images.

the code is executed as a C# desktop application on a machine that is on the same LAN as the NAS storage

I access remote storage using NetworkConnection class with credentials, i used this class:

https://gist.github.com/AlanBarber/92db36339a129b94b7dd

my question is :

which is better and affects the network traffic less ? splitting (tiff) file into images first, and then copying these images to remote storage? or doing the copy first and the splitting next?

What I have tried:

i was told that performing a (split) operation on remote storage actually retrieves a copy of the remote file to manipulate it locally and then returns result by streaming. and i think that adds unnecessary traffic on the network.

so i changed the code to do the splitting first, then the copying, but users haven't noticed an improvement in performance


what do you think?
Posted
Updated 13-Feb-18 7:01am

1 solution

The least amount of traffic is going to be copying the file locally, doing the split into individual files, then copying the split files back to the NAS.

This in no way means that you're going to get better performance, but only the minimum of traffic.
 
Share this answer
 
Comments
nina4ever 13-Feb-18 13:18pm    
i already have the files on local machine. so you vote for splitting then copying.

but what do you mean i will not get better performance? doesn't less traffic mean faster processing of the files?
Dave Kreskowiak 13-Feb-18 13:39pm    
By copying the file to the NAS and then splitting it, you're actually putting in a extra round trips to the NAS unnecessarily.

The split does not get processed by the NAS. It gets processed by your code on your local machine. So, to do that, it has to read the file all over again, bring the bytes back down over the network again after you just copied them all up to the NAS.

Do operations like this LOCALLY, minimizing the traffic on the network.

You're going to have to profile the code used to do the split in order to find where the bottleneck of this process is going to be.

I can't tell you where the problem is going to be because I know nothing about the code that's splitting the file.

Keep in mind that you may not be able to get better performance out of this!
nina4ever 13-Feb-18 13:42pm    
thank you so much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900