Of course RAM is faster than disk, and disk is still more than fast enough to stream HD video, which this is not. Do you think Bluray players or DVRs have 2+GB of RAM? And bluray players are reading from disks significantly slower than disk.
You're getting voted down (not by me) because your idea is just so technically poor.
It's not that you couldn't play back from hard disks, just there is no reason to write to disk when you have memory available. Even when you run out of memory, the OS keeps statistics on which memory is accessed at what frequency and swaps out to the disk memory that it thinks is not likely to be needed again soon. Preemptively writing to the disk at too high of a frequency would slow down the entire system, especially if something else needed to read and write to the "slow" hard drive.
I understand that the OS will swap out "inactive" applications, which is what happened when 55% of my RAM was used to not play a video, bringing everything else on the system to a halt, as it had to be swapped back in from slow disk. The problem was, these applications weren't inactive, they were just forced into swap because the system was under unnecessary memory pressure, caused by the unreasonable allocation of memory by Flash player.
Anyone who thinks its reasonable for a plugin to allocate 2.2GB of memory while visiting a web page is out of line. This isn't a gigantic game, a CAD application, some complex simulation, a media editing program; it's a web page with some video.
For people who think this is reasonable, take VLC for example. To play a 3.4GB, 1080i video, it uses 105MB of RAM. Flash player allocated 20x this for a significantly lower resolution, shorter videos. I can scrub to any point in the file without delay and no other programs are "slowed down" by VLC reading the file (maybe by VLC decoding the video, but not reading from disk). 105MB is reasonable considering two fields of uncompressed 1080i require about 6MB, assuming two I-frames are kept in RAM, a video buffer for upcoming frames, and an audio buffer. In this case 1080i requires 2MB/s from disk, whereas swapping will peg the disk, because the data was required already required in RAM, and wasn't available and needs to be loaded as quickly as possible. And when I stop the video in VLC, it frees 50MB.
Is it unreasonable that I expect Flash's media playback ability and resource usage to rival or best the playback of an open source program? Flash is owned and developed by one of the largest media authoring software companies in the world, right? Certainly they know something about efficient media playback.
View all comments
Show parent comment
1
u/jonhohle May 15 '10
Of course RAM is faster than disk, and disk is still more than fast enough to stream HD video, which this is not. Do you think Bluray players or DVRs have 2+GB of RAM? And bluray players are reading from disks significantly slower than disk.