Jaa


Beating up your PPC with the web...

In my recent Persistent Storage entries I talked about the issue that if you do extensive web browsing, you could write a ton of files to your flash and shorten its life.  (Gerard, sorry I mischaracterized your question.  I did understand you, but it was easier to explain "browsing 1000 web pages a day" than "browsing 100 web pages a day, each with 10 items on it" etc.  Even though everyone reading can do the math, "1000" just hits home better than "100 times 10.")

I gave one solution (disabling the cache) and promised to give a better one.  Unfortunately, I'm only going to be able to go about halfway on that promise.  I wanted to show people how to move their temporary internet files to a ramdisk.  But I'm finding that we're just not there yet in terms of ramdisks.  I did some asking around and didn't find any readily accessible ones.  (I didn't search heavily though.  The day job gets in the way.)  I suspect that, since PPC storage has been RAM based in the past, no one has seen a need to write a ramdisk yet.  Maybe an enterprising ISV will take up the challenge now.  We do have a fully tested ramdisk driver in our platform builder distribution (it's under \public\common\oak\drivers\block\ramdisk), but the day job definitely doesn't give me time to package that up into something end users could reasonably install.

So, what I'm going to do is tell you how to move your temporary internet files elsewhere.  It's half the story, but it's better than nothing.  If you move them to a storage card, then at least you'll only thrash that card.  They're pretty cheap these days.  And, to answer a question asked, yes, storage cards are wear leveled too.  So, with a relatively big one, you've got a lot of web browsing to do before you write it to death. 

Doing this is going to require editing the registry.  It's definitely a power user sort of thing to do.  But, then again, browsing enough web pages to make this a concern is a power user sort of thing as well.  That said, I talked with the PIE lead and he's comfortable with me giving this information to you.  For a different reason he uses this technique himself to move his cookies to a storage card.  (By the nature of what we do, we frequently need to flash new builds on our devices.  And doing that erases user storage.  So he stores his cookies remotely in order to not lose them.)  Incidentally, in talking with the PIE lead I suggested that he look into putting stuff in a ramdisk.  It's an interesting idea, because it would improve PIE performance as well.  We'll see where that goes in future versions.  (But any changes would be down the road a ways.)

One more caveat before I give the registry key.  Typical users, you don't need to do this.  Typical flash blocks can be rewritten a million times (my 250,000 number was old), and it's wear leveled so that no one block is written over and over again.  This is only a concern for people who do extensive web browsing on a daily basis. 

The registry keys you want to change are under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders.  (This is a new location for WM5.  It was in a different location in WM 2003 SE.)  You'll find three values there, one for the cache, one for the cookies, and one for history.  You can move just the cache, or two of them, or all three.  It's up to you.  You'll find that they all currently point to \Windows\<more stuff>.  I suggest just changing the \Windows\ part to \Storage Card\ and leaving the rest the same.  That'll make it easy to put them back later if you want.

Change the key, close and reopen PIE, and it'll start using the new location.  It'll create the directory if it doesn't exist.  I tried this on one of my devices and it worked fine.  If you eject the card, it'll just not cache files until you put the card back in.  PIE will keep working. 

Now, for the other half of the solution, if you find a ramdisk, install it and point the same key at wherever it's mounted.  If I stumble across one, I'll post it here.

Mike Calligaro

Comments

  • Anonymous
    July 22, 2005
    Since last night (Thursday), my smartphone has, literally, been my conduit to the world; I had to drive...
  • Anonymous
    July 22, 2005
    Many devices have started coming with "ram disks" already in the device. For example, I've got an "IPAQ File Store" on mine. Would that be a better place for the temporary internet files than the storage card?
  • Anonymous
    July 22, 2005
    The comment has been removed
  • Anonymous
    August 05, 2005
    I have been mobile-only for over a week now except while at work (see my blog for more on that) . When at work, I am on the web testing the sites I am working on as well as some recreational surfing. I have an Audiovox SMT 5600 with a 1gb card. Would you recommend I make this change? Can/should I move the existing history, cookies, and temp files to the card when I make the change?
  • Anonymous
    August 08, 2005
    Shannon, every time they try to give me a laptop at work, I turn them down. I use PocketPCs and Smartphones instead. And I use them extensively. The only time I've ever moved the cache to a different location was in researching this blog entry. I don't think it's something most people will need to do. That said, if you're concerned, it won't hurt to move it.

    I'd probably just move the temp files, and leave the history and cookies where they currently are. If you do move all three, you can try copying the existing files over with Active Sync->Explore. I haven't tried that, but I don't see why it wouldn't work. If you don't move them, it will act as though you cleared your cache. Everything will still work, but you'll need to regenerate your history and cookies, etc.

    Mike Calligaro
  • Anonymous
    August 16, 2005
    Hi Mike,
    you wrote, "But I'm finding that we're just not there yet in terms of ramdisks. I did some asking around and didn't find any readily accessible ones".

    Maybe you want to try this one:
    http://forum.xda-developers.com/viewtopic.php?t=20312

    :o)
    buzz
  • Anonymous
    August 23, 2005
    How can I delete the index.dat, which is much too big for my concern?
  • Anonymous
    August 25, 2005
    Jochen, can you give me more information? Which index.dat?

    Mike Calligaro
  • Anonymous
    September 16, 2005
    You said that there is a new cache location for WM5. I have an iPAQ rx3715 with WM2003SE. Could you tell me what the location for my device is?
  • Anonymous
    September 19, 2005
    Angelo, I don't have a Pre-WM5 device around to confirm this, but I found the following external website that describes what to do.

    http://www.phm.lu/PocketPC/RegTweaks/Tweak.asp?ref=7

    Note that this isn't a Microsoft site, and its content could change without our knowledge. Your mileage may vary. But what it currently says appears to be correct.

    Mike
  • Anonymous
    June 06, 2006
    I need to develop a RAMDISK for the iPaq. How can i accomplish this? Via Platform builder?
  • Anonymous
    June 06, 2006
    Leonardo, if you have Platform Builder, the RAMDISK sample is in PublicCommonOakDriversBlockRamDisk

    Mike
  • Anonymous
    July 16, 2006
    The comment has been removed
  • Anonymous
    July 25, 2006
    Thanks to Solnyshok, Mike, Mamaich there is a ramdisk now available on the web. See link here http://forum.brighthand.com/showpost.php?p=1390493&postcount=6

    This should be just excellent for browser caching
  • Anonymous
    July 28, 2006
    I have made the change in registry of TempPath from 'Application DataVol' to 'Ramdisk' but I still see files appearing in the old path, I believe this is because the ramdisk is not loading during the boot phase as 'RamDiskLoader.exe' is in the startup folder which suggests it loads after the shell and other devices (SD Cards etc)...How can I make the Ramdisk startup at the same time as other Disk (SD/CF Internal Flsh) devices to ensure tempfiles get stored to Ramdisk?????
  • Anonymous
    July 28, 2006
    I did try to use init in the regestry whithout much success, I used the following:
    initLaunch81Ramdisk.exe
    initLaunch173Ramdiskloader.exe

    I changed 81,30,19,174 to see if I could make it start at different times with limited success as sometimes it would start but would ignor my Size value, so the ramdisk size would only be a few k and not the 5MB I stated in registry..

    I made sure the files are located in the windows directory,

    I hope this is clear enough.
  • Anonymous
    May 08, 2007
    The comment has been removed
  • Anonymous
    August 30, 2007
    I am an OEM and want to create a persistent (across soft resets) Ramdisk for our device very much like the one created for the WM5 Blue Angel.  Will the Platform Developer sample Ramdisk do that? Do I need to RESERVE some RAM in my bib file so WM6 won't use it? Thanks, sbl