to copy or open.
-
This is more of a theoretical question that anything else. There is no way to simulate it(All results will differ from implementation to implementation) so here goes. What will be faster (The least amout of bytes). To download (Save) a file from a website or to open the file directly in the browser
Stephen Lintott Bsc IT (RAU)
-
This is more of a theoretical question that anything else. There is no way to simulate it(All results will differ from implementation to implementation) so here goes. What will be faster (The least amout of bytes). To download (Save) a file from a website or to open the file directly in the browser
Stephen Lintott Bsc IT (RAU)
Well if you download an image or open directly in browser you would still need to stream the image, so the byte count for the image atleast will always be the same. As far as i know whenever an image is viewed in the browser it is downloaded to computer anyway. So surely its the same process.... just my thoughts, i may be wrong
If only MySelf.Visible was more than just a getter... A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
-
This is more of a theoretical question that anything else. There is no way to simulate it(All results will differ from implementation to implementation) so here goes. What will be faster (The least amout of bytes). To download (Save) a file from a website or to open the file directly in the browser
Stephen Lintott Bsc IT (RAU)
There's no difference between the two processes. The file is downloaded into the browser cache either way.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Well if you download an image or open directly in browser you would still need to stream the image, so the byte count for the image atleast will always be the same. As far as i know whenever an image is viewed in the browser it is downloaded to computer anyway. So surely its the same process.... just my thoughts, i may be wrong
If only MySelf.Visible was more than just a getter... A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
-
You're right. If you save it, the byte stream will go to a place you have to assign. If you open it, you will save the picture in your cache. But if you want to open it I guess you also put it in your RAM, so I guess saving would be slightly quicker.
Deresen wrote:
But if you want to open it I guess you also put it in your RAM
No, it won't, since there is no telling how big the file is and it could run the system out of memory, the file is written directly to disk, then the file is launched using the Shell. ...and the OP didn't say anything about a picture, but listed generically, "file".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You're right. If you save it, the byte stream will go to a place you have to assign. If you open it, you will save the picture in your cache. But if you want to open it I guess you also put it in your RAM, so I guess saving would be slightly quicker.
Thanks... its good to know i get things right sometimes :) I was thinking there would be extra work in the loading but as the OP asked about displaying in a browser i assumed the intent was to show it to the end user in which case he would be displaying after download anyway... but as, like in most cases, the OP is AWOL we shall prob never know their aim lol
If only MySelf.Visible was more than just a getter... A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
-
This is more of a theoretical question that anything else. There is no way to simulate it(All results will differ from implementation to implementation) so here goes. What will be faster (The least amout of bytes). To download (Save) a file from a website or to open the file directly in the browser
Stephen Lintott Bsc IT (RAU)
Hi, save=download+writeToFile open=download+writeToScreen Now what is faster depends on the complexity of the data. If it is simple HTML and a modern PC, showing it would typically be faster than writing it to disk; OTOH if it is a complex Excel file with lots of start-up macro's clearly writing to file would be faster since it does not require launching the app nor interpreting/executing the data. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:01 AM
-
Deresen wrote:
But if you want to open it I guess you also put it in your RAM
No, it won't, since there is no telling how big the file is and it could run the system out of memory, the file is written directly to disk, then the file is launched using the Shell. ...and the OP didn't say anything about a picture, but listed generically, "file".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008That's true. And we assume it is a file. The file has to be downloaded, always, if you save it or if you show it. But if you show the file, the computer has to write the bits to the screen. This will cost time and possible more data which will stream to the ram.
-
Hi, save=download+writeToFile open=download+writeToScreen Now what is faster depends on the complexity of the data. If it is simple HTML and a modern PC, showing it would typically be faster than writing it to disk; OTOH if it is a complex Excel file with lots of start-up macro's clearly writing to file would be faster since it does not require launching the app nor interpreting/executing the data. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:01 AM
Ok I get what your saying. But I did an experement with eathereal and saw that if you copy the file from a file server there is more chater on the network than if you open the file. I'm just wondering if the same applies to a download or open over the net.
Stephen Lintott Bsc IT (RAU)