Friday, July 25, 2008

Turbocharging Cachemate

I got myself a Palm Tungsten T5 a while back to use for paperless caching. Now, before I scare away those of you with limited budgets, I'll confess that it's much more than I really need for the task -- in fact, my old Palm IIIxe, which I sold to another cacher for about $20, would have been more than adequate for the task. But the color screen is a lot easier for me to read (most of the time -- glare can be a problem on sunny days), and the additional memory along with the support for an SD memory card were big plusses for me.

You see, there are some days when I set out specifically to go caching. So creating a pocket query, getting the data into Cachemate, and hitting the road aren't big problems. BUT . . . . there are even more days -- say, about 90% of all days -- when I'm simply out and about in the Chicago metro area and find myself with some time on my hands and wishing I could find a cache or two nearby. But if I didn't know ahead of time I was going to be in that area, and that I'd have time for caching, then no PQ, no Cachemate data, and no waypoints in my GPSr.

So, I've set up a series of pocket queries that run weekly to collect all of the caches in areas of interest to me -- Northern Illinois (roughly, everything north of I-80), parts of Wisconsin (where I camp, and where my daughter goes to college, and the routes along the way), parts of New Jersey (where my in-laws live <insert your own New Jersey and/or in-laws joke here.>). Right now, in GSAK I have 5365 Illinois caches, 1366 Wisconsin caches, 998 New Jersey caches, and 127 caches in a database I call "events" -- not geocaching events per se, but any special occasion for which I want to load up caches in particular areas.


Turns out it's easier said than done. When I hotsync my PDA and start to load up the data into Cachemate -- especially the large Illinois and Wisconsin data loads -- I can watch everything progress nicely for the first couple hundred caches. But then it gets slower . . . . and slower . . . . . . . and slower . . . . . . . . . . . . . and slower . . . . well, you get the picture. And, sometimes, the load fails before it's processed all the caches.

There has to be a better and faster way. Fortunately, there is! Cachemate supports memory cards on the Palm PDAs, and in the documentation it describes how to take advantage of it. But before going into the technical details of how to do it, let me give you a quick description of why it works.

When you create your Cachemate file for the PDA and hotsync it, what happens is that Cachemate loads (or tries to load) all of the cache data into its database. If you have thousands of caches, many of which may have lengthy descriptions and/or lots of logs, that takes up a lot of space and time. When you use memory card support, though, Cachemate handles the load a bit differently. Instead of copying all of the cache data to its database, it instead loads just the cache ID and a few bits of other data, along with a pointer to the rest of the data which remains on the memory card instead of being transferred into the database. In addition, since you're going to take the hotsync process out of the procedure, you can save even more time getting the data to the PDA. So, let's move on to the geek stuff.

Step 1: Clear databases on Cachemate (optional, but recommended) For me, GSAK is my database of record. While Cachemate can merge information, I always completely replace the data with new data from GSAK. On your PDA, launch Cachemate, then from the menu, select each of your databases you are about to load, and use the CLR button to clear them out.

Step 2: Connect your PDA to your computer as a USB drive. Plug your Hotsync cable into your PDA and a USB port on your computer. (USB 2.0 is recommended, if available -- it's a lot faster.) Go to the main application screen on your PDA; there will be an application called Drive Mode. Tap on that application, then tap on the Turn Drive Mode On button.

Step 3: Create folder for Cachemate files (first time only) Your PDA will now show up in Windows Explorer as a disk drive -- or two, if you have an SD card installed. (**See important note at the end of this article.) On this new disk drive, you have to create one of the four folders that Cachemate looks for, as described in the documentation. To keep it simple, I created the \Cachemate folder. You only have to do this the first time.

Step 4: Create Cachemate files. I use GSAK, so that's what I'm using in this example. But whatever tool you use to create your Cachemate files, the process should be similar. In GSAK, you simply specify the drive letter and path for the file you're creating, pointing it to the folder you just created. Also, uncheck the box that says Install to Palm after conversion -- you don't want to do this, because there is no need for Hotsync to process the file. After you've created your files, they'll show up as .pdb files in the folder you created.

Step 5: Disconnect the PDA from the computer. And make sure you do it properly, so you don't lose any data. Down in the system area of your Windows taskbar is an icon that will allow you to "safely" disconnect your USB drive. You need to do this so that Windows will flush out its write buffers to your PDA. After Windows tells you it's safe to remove the device, then click the Turn Drive Mode Off button on your PDA.

Step 6: Launch Cachemate and load data. Launch Cachemate on your PDA. A screen will pop up telling you that new files have been found on your memory card. Click OK, and then a file import dialog will appear, once for each file you created. For each file, select the Cachemate DB you want that file imported into. If you didn't clear the DB first, then Cachemate will merge the data according to whatever identifier you selected for cachemate -- name or waypoint code.

Step 7: GO CACHING!!

How fast is it? Well, for the 5000+ Illinois caches I load, the import used to take 10-15 minutes -- if it worked at all. It often failed to complete successfully. With this new procedure, the import process on Cachemate finishes in about 30 seconds, and it always works. Do I need any more reasons to use the memory card support?

Update@21:05 -- let me clarify that this does not depend on having a separate memory card. If you can put the device in Drive Mode, then you can write to either the internal memory or the removable SD card. So if you have an older PDA that doesn't support an SD card, this may still work for you. And if your PDA does not come with a Drive Mode application, there may be a freeware version available you can download and install.

(**OK, here's the important note I promised you earlier. If you have an SD card in your PDA as well as its internal memory, it will show up as TWO separate drives when you turn on Drive Mode. And here's the kicker -- it always wants to use the lowest available drive letter plus the next consecutive drive letter. If that next consecutive drive letter is in use, it won't map the SD card. So if you have the most basic configuration with your hard drive as C: and a CD or DVD as D:, when you enter Drive Mode on your PDA, it will use drive letter E: for the internal memory, and F: for the SD card. But let's say you already have a flash drive attached as F: -- then, Drive Mode will map the internal memory as E:, but won't map the SD card at all. I tore out more than a little bit of hair before I found someone's blog post documenting this.)
Profile for WascoZooKeeper

No comments: