topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 6:36 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to disable Flash from caching to disk?  (Read 23749 times)

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
How to disable Flash from caching to disk?
« on: January 07, 2010, 04:54 PM »
Please forgive any ignorance I might be displaying here, it's mostly guesswork.

When I watch an online video, I tend to notice annoying little hesitations in the playback, where the video will freeze on a frame for a split second, but the audio doesn't. My guess is that this is Adobe Flash, busily prefetching video for smooth playback, but caching it to disk to be used moments later (and never again). Unfortunately, while this is happening, playback suffers. When disk activity ceases, playback is smooth. In fact, if I pause playback, wait for disk activity to stop, then press play, I don't see hesitation at all. So I think I've pinpointed the problem: Flash is stupid.

It's already pretty ridiculous that this act should affect video playback at all, it reveals either that Flash makes for a pretty lame video playback method, or a problem with the way my OS or hardware is working. The magical forces that play back video from RAM are/should be separate from the forces that store or retrieve data. There should only be interference if the data being retrieved is itself delayed.

Furthermore, I also use Hulu Desktop, an app that's little more than a standalone Flash player. It caches and plays back just dandy without hesitation unless there is an actual problem with retrieving data. (Also, I strongly suspect that in order to appease content providers, they prevent the app from ever storing data to disk, which helps protect streaming video from being freely stored and reused.)

So I know this can be fixed.

What I want to do is force Flash videos to store their temporary nonsense in RAM, which I have plenty of, and leave my hard drive the hell alone. Where do I configure this?

What's equally irritating is that with a web browser like Firefox, I already have plenty of control over how it works with respect to the disk. I can control disk cache, history length, whether or not it stores etc., or run it in a privacy mode that restricts disk caching of any kind. Flash bypasses all of this, like it is its own little fiefdom, it sets its own cache, its own cookies, phones home for updates, without ever presenting the user a way to configure any of this behavior. You can wipe your browser history all day long and flash cookies and goofy flash apps and such will stick around in cache until doomsday.

I know this stuff has to be configured somewhere. Where's it hiding?

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,748
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #1 on: January 07, 2010, 05:21 PM »
I'm not sure if this will resolve your problem, but you can adjust your Flash storage settings on a global level from Adobe's website.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #2 on: January 07, 2010, 05:29 PM »
While I have no idea what the answer might be, I (also hate flash) would like to applaud your absolutely brilliant rant.  :Thmbsup:

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #3 on: January 07, 2010, 06:16 PM »
Do you, by any chance, use FireFox for browsing? (whoops, reading your post a bit more closely, I think I already answered that myself :P)

I've noticed that FF stutters a lot more wrt. flash than IE or Chrome :(
- carpe noctem

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #4 on: January 07, 2010, 06:22 PM »
As much as I am a Mozilla fanboi, I have to corroborate F0d Man's statement. Flash under FF does seem to suck to an even greater extent than in IE.

Alternatively, if you're watching movies etc. in Flash and that's what's bothering you, there are many tutorials online and several userscript that can assist you in downloading them instead of watching them in-browser. I use HttpFox and Download from Youtube most often.

Ehtyar.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #5 on: January 07, 2010, 06:42 PM »
if you're using Firefox, you can try this tip from Lifehacker - How to Fix Annoying YouTube Jumpiness in Firefox.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #6 on: January 07, 2010, 06:48 PM »
if you're using Firefox, you can try this tip from Lifehacker - How to Fix Annoying YouTube Jumpiness in Firefox.
Ugh... why does session-store cause a speed bump like that? >_<
- carpe noctem

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #7 on: January 07, 2010, 06:53 PM »
Ugh... why does session-store cause a speed bump like that? >_<

that is one of the many idiosyncrasies of the fox. fwiw, i tried that option but didn't improve things by much..

i mostly depend on this GM script - YousableTubeFix for preventing autoplay, getting download links, etc.

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #8 on: January 07, 2010, 07:01 PM »
I have session store disabled, so I know it isn't that, plus playback is fine once the flash seems to stop caching. It's a setting worth configuring though, especially if you're running Firefox Portable from a flash drive. Actually, if you're running Ffox Portable with any kind of flash app, there's going to be drive litter anyway, which removes the portable part from the equation, nice.

I've dug around settings.sol, Flash's horrible little configuration file, with this app, but haven't been able to find a setting that might change this behavior.

I'm not quite bored enough to do this yet, but I could also run Procmon, figure out where the disk activity is, and find some way to lock down the folder so that data can't be written to it. Alternatively, there might also be a way to use a HIPS program to refuse disk write access to flash entirely, but the only way to do that would be to block Firefox itself, so that would be pointless. Finally, running an entire browser session from within a Sandboxie session might do the trick, since I think it stores everything in RAM and only writes to disk when it runs out of RAM or the session closes.

Of course, I won't do any of these things to alleviate what amounts to a minor irritation.

Hey Adobe, it's 2010 for crying out loud, I'm not asking for a flying car, I just want to access your horrible product's settings without a subpoena.
« Last Edit: January 07, 2010, 07:05 PM by doctorfrog »

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #9 on: January 08, 2010, 07:33 AM »
I hate to have to say this, but my 8-year old daughter Lily showed me the workaround to this problem a few weeks back.
"What you do daddy is you press the play button, then pause it, and you can see the red line keep growing whilst it is paused, so that when you play it again it's behind the red line."

She's right. It works. The caching takes place in advance of your playing the video. No stuttering video now!
« Last Edit: January 08, 2010, 07:34 AM by IainB »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #10 on: January 08, 2010, 10:35 AM »
IainB: I use that trick when on slow connections, or when there's "a curl on the intertubes" at home... but it doesn't solve the hiccups I have, unfortunately - dunno what causes them exactly, but they seem limited to FF and not IE or Chrome :)
- carpe noctem

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #11 on: January 08, 2010, 02:07 PM »
I hate to have to say this, but my 8-year old daughter Lily showed me the workaround to this problem a few weeks back.
"What you do daddy is you press the play button, then pause it, and you can see the red line keep growing whilst it is paused, so that when you play it again it's behind the red line."

She's right. It works. The caching takes place in advance of your playing the video. No stuttering video now!
Your daughter says "whilst?" That's adorable (I'm an American, we don't say that unless we're being pretentious nerds).

Yeah, I already knew that trick, it's in the OP. Too bad flash doesn't know that trick though. Again, a user-editable config file would at least partially address this.


IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #12 on: January 09, 2010, 05:34 AM »
@doctorfrog: You write "...flash doesn't know that trick".
Well, it seems to work for .SWF files - that's flash - right? But I just realised that I am using a FF plugin that invokes an alternative Flash player called "FlowPlayer". Maybe that's why?


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #13 on: January 09, 2010, 06:18 AM »
@doctorfrog: You write "...flash doesn't know that trick".
Well, it seems to work for .SWF files - that's flash - right? But I just realised that I am using a FF plugin that invokes an alternative Flash player called "FlowPlayer". Maybe that's why?
I think he means to imply that it doesn't stop flash from caching the content to disk, which is correct... but it does enable you to pre-cache an entire video, so it should eliminate disk-caused stuttering :)
- carpe noctem

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #14 on: January 10, 2010, 12:33 AM »
Do you have compelling evidence that suggests it's the disk caching that's responsible?

- Oshyan

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #15 on: January 11, 2010, 06:33 PM »
It seems to be a known issue and a known feature of flash players. I admit to making suppositions in the OP, but I'm probably right. Using RAM instead of disk is nearly always faster.

Here, I'll put some money where my mouth is. Here's a sample of some activity:


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #16 on: January 12, 2010, 12:21 AM »
Using RAM instead of disk is nearly always faster.
FWIW my %temp%, firefox internet cache, firefox profile dir (including the sqlite databases!) are all on a RAMdisk - and I still get the stuttering when viewing flash videos in FireFox... I think it's pretty safe to rule out disk access as being a factor.

Chrome doesn't seem to stutter, and that's even though I haven't moved it's internet cache to the ramdrive - the flash file being streamed obviously goes to %temp%, though, so that is going to RAM. And either flash or chrome is being really lame about something - with procmon I see massive amounts of repeated QueryStandardInformationFile spamming on the file, wtf? And it keeps doing it even when playback is done... so until I navigate away from the now-done video, it's producing zillions of entries like
07:00:18,1721718 chrome.exe 2528 QueryStandardInformationFile R:\temp\fla7E25.tmp SUCCESS AllocationSize: 20.472.832, EndOfFile: 20.472.452, NumberOfLinks: 1, DeletePending: False, Directory: False
07:00:18,1721948 chrome.exe 2528 ReadFile R:\temp\fla7E25.tmp END OF FILE Offset: 20.472.452, Length: 16.384

I assume it's the flash plugin's fault though, since exactly the same happens in FireFox.
- carpe noctem

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,026
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #17 on: January 12, 2010, 10:01 AM »
Maybe uninstall flash for FF and install it from adobe.com.
Install it running and with FF.
It's been upgraded or changed since some time ago.

this may help

http://www.flashcookiecleaner.com/

+this new faster fox has a cache cleaner

https://addons.mozil.../firefox/addon/14833

expermental but works great
« Last Edit: January 12, 2010, 10:05 AM by cmpm »

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #18 on: January 12, 2010, 03:27 PM »
Using RAM instead of disk is nearly always faster.
FWIW my %temp%, firefox internet cache, firefox profile dir (including the sqlite databases!) are all on a RAMdisk - and I still get the stuttering when viewing flash videos in FireFox... I think it's pretty safe to rule out disk access as being a factor.
Then we're left with my original observation: Flash is stupid. Just make sure that Flash isn't funneling its own cache somewhere else on disk.

I'm sure that eventually this will be addressed by Adobe, but in the meantime, it's still really annoying to have a 'helper' app that basically does things its own way, and hides cookies, cache, and other settings in distant areas of your profile and system directories. I use Netflix's online player, which is based on Microsoft Silverlight, and it's no better, but at least it doesn't stutter.

Well, this turned into more of a rant than a problem-solving session, but thanks for your collaboration, all.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #19 on: January 13, 2010, 04:02 AM »
I use Netflix's online player, which is based on Microsoft Silverlight, and it's no better, but at least it doesn't stutter.
Does that work inside FireFox? Pretty interesting if it does and doesn't stutter, then...

And yeah, flash is kinda stupid, in several ways. But at least it's well-behaved enough to use %TEMP%.
- carpe noctem

thorazine74

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #20 on: January 13, 2010, 05:26 AM »
If you are talking about FLV videos I think they dont bypass Firefox cache, they are stored in it, not in Flash internal secret hidden cache... I dont think what you are seeing in Process Monitor is the actual flv file being cache but maybe something else flash related, just guessing but maybe if you blocked local settings from being stored, maybe what you are seeing is the flash code trying to store the settings and the flash plugin refusing over and over...
You can use this Firefox extension to control Firefox caching mechanism: BetterCache.
The description emphasizes its capabilities to make everything cache despite of http headers and the like but actually it incorporates a whitelist/blacklist feature that should let you put a rule to never cache flv files (never tried it myself though).
Anyway I think what you are experiencing is not related to disk caching slowing down flash playing but something else, unless there is a bug in firefox flash plugin or something is wrong with your disk.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #21 on: January 13, 2010, 05:34 AM »
If you are talking about FLV videos I think they dont bypass Firefox cache, they are stored in it, not in Flash internal secret hidden cache... I dont think what you are seeing in Process Monitor is the actual flv file being cache but maybe something else flash related
Dunno if the FLV vidoes are also stored in the FireFox cache, but for both Chrome and FF (haven't checked with IE) it definitely is the video going to %TEMP% - file size doesn't lie, and when watching one particularly long video I ran out of space, and the video wouldn't stream/play any further.
- carpe noctem

doctorfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 140
    • View Profile
    • Donate to Member
Re: How to disable Flash from caching to disk?
« Reply #22 on: January 14, 2010, 11:13 AM »
I use Netflix's online player, which is based on Microsoft Silverlight, and it's no better, but at least it doesn't stutter.
Does that work inside FireFox? Pretty interesting if it does and doesn't stutter, then...

And yeah, flash is kinda stupid, in several ways. But at least it's well-behaved enough to use %TEMP%.
Yes, it works in Firefox. There were some speedbumps when Netflix switched over to it, but it's fairly solid now. It does lack the front end feel of Hulu Desktop, but it's not bad.