Uploaded file stored in browsers memory

Hi,

I've noticed that any file that I'm trying to upload using SWFupload first gets loaded in to my browsers memory. Is this the expected behaviour? Is there anything I can do to make it stream from the disk instead because obviously this will make uploads of really large files much less intensive on the client than with the current setup?

My setup is
- SWFupload 2.1.0 with flash 9 component
- Firefox 2 or Safari 2 running on OS X 10.5.2 and with whatever flash version 9 that comes with it

gyphie's picture

Hmmm..

What version of Flash Player do you have?

Unfortunately I do not have a Mac to test on. On Windows I uploaded an 84 MB file 10 times with less than 1 MB increase in memory consumption from the browser (FF 2 & Safari 3.0.2)

Flash Version

Hi,

thanks for replying.

I'm running version 9.0.115.0, which is the version that comes with OS X 10.5.2.

Cheers

Johan

Same problem with latest flash version as well

Hi,

I tried on another machine which is running flash 9.0.124.0 (the latest version) and it has the same problem. I've also tried using both the flash v8 and v9 version of SWFupload.

The way I've implemented SWFupload is following the "simple demo" : http://demo.swfupload.org/simpledemo/index.php

Any thoughts?

Cheers

Johan

Any resolution?

I'm seeing this problem too both on windows and mac. All the files get loaded into memory and then the browser just dies.

gyphie's picture

Local servers

I am unable to reproduce this issue.

Are you running a local webserver. Some servers store uploaded files in memory until the upload is complete and then it is written to disk.

Are you actually seeing the memory usage of FireFox increase by the amount of the file size? On my system FireFox memory usage actually decreases as soon as the File Selection dialog closes.

This is certainly an issue

Hi, first thanks for the great work...

...But... it is in fact true that when you upload a file that the file is loaded into memory and not streamed.

This is not a server issue so we can cross that off.

There's two things that could be happening:

1) Flash could be loading the files into memory WHILE it is streaming.
2) Or it could load the files into memory BEFORE it starts.

Whichever this is the effect is fairly easy to see. On a MAC just fire up your "Activity Monitor" program and watch the Real Memory and Virtual Memory usage of your Firefox or Safari climb to the size of the file you are uploading.

I'm sure you can get a similar program in Windows and watch the same thing.

Obviously this isn't a problem for a megabyte or a hundred, but for a large file, say over a GB this causes some serious client issues.

If the situation is #1 from above then it should be possible to slow the speed at which the file is loaded into memory so that it keeps up with the upload speed. Oops... I'm just reading about fileReference and it seems loading the file in chunks is not possible.

Well... I've seem some things approaching miracles with Flash so I'm sure the community will solve the issue, or else bug Adobe enough to add that function.

I hope this can be resolved soon!!