473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Re: Fastest way to write huge files

Thanks all ,
but there is still something i forget to state -sorry - all
communication will be via Http with a server
so data is received via Http
so local network solutions won't work
the problem really starts after receiving data in storing them without
much of a CPU/Memory usage and with a good speed

@James Mills : didn't understand fully what you mean and how it will
improve writting effciency

Thanks,

Regards,
Mohamed Yousef

2008/8/29 Tim Golden <ma**@timgolden.me.uk>:
Terry Reedy wrote:
>>

Mohamed Yousef wrote:
>>>
let's say , I'm moving large files through network between devices
what is the fastest way to do this ?
what i came up with :-

Use your OS's network copy command. On unix, that was once uucp. On
Windows, I drag-and-drop to/from a Network Neighborhood location, including
to a printer, so I don't know whether you can use copy and if so how.

For completeness' sake, on Windows you could use any of the following
techniques with a UNC as the destination (and/or source):

http://timgolden.me.uk/python/win32_...py-a-file.html

TJG
--
http://mail.python.org/mailman/listinfo/python-list
Aug 29 '08 #1
3 2753
Mohamed Yousef wrote:
Thanks all ,
but there is still something i forget to state -sorry - all
communication will be via Http with a server
so data is received via Http
so local network solutions won't work
the problem really starts after receiving data in storing them without
much of a CPU/Memory usage and with a good speed

@James Mills : didn't understand fully what you mean and how it will
improve writting effciency

Thanks,

Regards,
Mohamed Yousef

2008/8/29 Tim Golden <ma**@timgolden.me.uk>:
>Terry Reedy wrote:
>>>
Mohamed Yousef wrote:
let's say , I'm moving large files through network between devices
what is the fastest way to do this ?
what i came up with :-
Use your OS's network copy command. On unix, that was once uucp. On
Windows, I drag-and-drop to/from a Network Neighborhood location, including
to a printer, so I don't know whether you can use copy and if so how.
For completeness' sake, on Windows you could use any of the following
techniques with a UNC as the destination (and/or source):

http://timgolden.me.uk/python/win32_...py-a-file.html

TJG
--
http://mail.python.org/mailman/listinfo/python-list
If connection is over Internet via HTTP the connection speed is so slow in
relation to the speed of your CPU that it doesn't really matter. You are
prematurely optimizing your application. Get it working first and then see if
the file writing is the bottleneck (it probably won't be).

-Larry
Aug 30 '08 #2
>
If connection is over Internet via HTTP the connection speed is so slow in
relation to the speed of your CPU that it doesn't really matter.
this is not always true , espicially when using a localhost or a local
netwtork server
the problem is the increase in cpu and memory usage make it a painful bug
such that downloading a big file (say 1 GB ) would introduce a big cpu
usage (already tested)

Thanks ,

Regards,
Mohamed Yousef
Aug 30 '08 #3
Mohamed Yousef wrote:
>If connection is over Internet via HTTP the connection speed is so slow in
relation to the speed of your CPU that it doesn't really matter.
this is not always true , espicially when using a localhost or a local
netwtork server
the problem is the increase in cpu and memory usage make it a painful bug
such that downloading a big file (say 1 GB ) would introduce a big cpu
usage (already tested)

Thanks ,

Regards,
Mohamed Yousef
I disagree. There is very little overhead in file writing if you stream your
writes to disk in small blocks as they arrive via HTTP. Don't wait for the
entire 1Gb to arrive and then write it. Python can write small to a file
blazingly fast with normal file writing I/O. Any extra CPU overhead you may see
is probably due to reading the entire 1Gb into memory and seeing swapping to
disk as you exhaust main memory. Interleaving your HTTP reading with file
writing should be very fast.

-Larry
Aug 30 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: David P. Jessup | last post by:
Well I have seen this posted before and haven't seen much in response. My application has to browse through various folders and find file names. Sometimes these folders can have thousands of...
17
by: DraguVaso | last post by:
Hi, I need to find the FASTEST way to get a string in a Loop, that goes from "a" to "ZZZZZZZZZZZZZZZZZ". So it has to go like this: a b .... z
11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
1
by: tim | last post by:
I have a multi-dimensional byte array, private someArray(,,) as byte and it's huge redim someArray(100,640,480,3) after populating the array, I write it to a text file to save it. (so I don't...
0
by: Stephen | last post by:
Hi, Suppose I have 2 tables. TableA has about 3 million rows and TableB has about 50,000 rows. Assuming a btree index is used in the time column. I need to query a limited and time ordered...
11
by: Prateek | last post by:
I have 3 variable length lists of sets. I need to find the common elements in each list (across sets) really really quickly. Here is some sample code: # Doesn't make sense to union the sets -...
9
by: Phill W. | last post by:
VB.Net 2005 SP1 Windows Forms Application What's the fastest way to append text to a TextBox? I have an application that monitors data written to text files. It needs to scan some fairly...
1
by: Mohamed Yousef | last post by:
Hello , let's say , I'm moving large files through network between devices what is the fastest way to do this ? what i came up with :- 1) using regular file operations with an in memory limit...
0
by: James Mills | last post by:
Hi, You could use generators connected via a pipe or tcp socket ... cheers James On Fri, Aug 29, 2008 at 10:35 AM, Mohamed Yousef <harrrrpo@gmail.comwrote:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.