Launching Firefox Quickly: XP and Windows 2000

If you’re like me, a considerable amount of your computing experience takes place within Firefox.  I have a couple of old, slow computers, however, for which the actual loading speed of Firefox itself is problematic.  Either can keep up fine with web content, and their connections are fast, but Firefox itself can take a surprisingly long amount of time to come up  — which is inevitably when I need it.  Leaving Firefox open but minimized is a somewhat reasonable solution, except for Murphy’s law, which is strictly enforced here, means that I need Firefox after having just booted the machine, or just closed it without thinking.

XP has a strategy for speeding the load time of any application, which is known as “prefetching.”  There are a lot of myths and misinformation about what this is, but essentially, XP keeps track of how a program is loaded, and stores this information in its prefetch area.  Next time the same program is launched, XP consults the prefetch area to see how to load the program optimally.

N.B.:  XP prefetching is automatic and works for every application.  There’s a myth that adding “/prefetch:1” (or some other number) switches to the end of your program’s launch criteria will do something beneficial with the prefetch subsystem.  It does do something, and that is to pass the number to the hash used for prefetching.  So adding it will have the effect of first slowing down the launching of Firefox to its unprefetched speed, then the next time it’s launched, it will be as fast as it was before the switch was added.  Naturally, adding this switch is simply a waste of time.

While I’m digressing, I should point out that clearing the prefetch folder is an equally pointless waste of time and resources.  Getting rid of the trace and layout files won’t make prefetching any better, it will just force them all to be recreated, thus slowing down the initial launch of all applications until this is reconstructed.  Windows actually cleans out the folder itself whenever it needs it, so it’s best just to leave it alone.

Which brings me back around to Windows 2000, the venerable operating system on which my tablet runs Firefox.  Win2k has no prefetching system, so that alternative strategies need to be employed.

This leads to an alternative strategy called “preloading,” which is not like prefetching at all, but more like loading Firefox and minimizing it, where much of Firefox is actually in memory.  Early versions of Firefox included a “turbo launcher,” which was a little bit of software that loaded Firefox in memory so that it would be handy.  This is no longer included, but a third party built a “Firefox Preloader,” which for all intents and purposes is the same thing.

The project is essentially dead, since prefetching made preloading less useful for XP and later versions of Windows.  However, it does work for the latest versions of Firefox, and it works quite well on Windows 2000.  The installer can be downloaded here:

http://sourceforge.net/projects/ffpreloader/

It works by looking for “Firefox.exe” and then loading it into memory.  Next time firefox.exe is launched, nearly everything it needs is already in memory instead of loaded from disk.  Prefetching makes this nearly pointless on XP, but the speed difference on an old Win2k box is stunning — assuming you actually have enough RAM to leave Firefox constantly in memory.

Share

Stupid Gentoo Tricks

What initially attracted me to Gentoo is its sometimes-elegant portage system, which is Gentoo’s version of a package manager — one of the things that distinguishes Linux flavors from one another.

Portage suffers from a sort of chicken-egg conundrum in that portage and all of its files and dependencies are themselves managed by portage, which means that upgrading libraries that everything relies upon can quickly lead to a system where portage becomes inoperative.

Recently, I managed to mangle “wget” by deinstalling a library it relied upon.  This is difficult to recover from since wget is essential to portage’s ability to install packages … such as wget and the libraries it requires.  I also discovered that an ftp client is not installed by default, which is surprising, but effectively ruled out just copying a working wget from another system.

As it turns out, the default Gentoo installation does include busybox, which is theoretically less functional, but will do the trick.  For those unfamiliar with busybox, it’s essentially one binary that contains (and is capable of replacing) a number of tiny command line functions, from cp and cat to rm and xargs.  If you have it installed, typing “busybox” will tell you exactly what command line tools it can replace.

Therefore, it’s possible to [re]install wget by telling portage to use busybox’s wget instead of wget itself:


FETCHCOMMAND="/bin/busybox wget \${URI} -P \${DISTDIR}" emerge wget

Share

Unusually Talented Cats

When I lived and worked on a goat farm in western Massachusetts, we had two cats:  the house cat, “Pzzat”, whose role, like most cats, was to lounge around the house and exude softness and warmth.  The second cat, “Barnyardette,” or “Barny,” for short, lived in the barn and had a more useful role — to keep vermin away from the grain that  feeds the goats.  Pzzat had a bowl of food in the house.  Barney did not have a bowl of food anywhere, being entirely self sufficient.

Barny looked much like other cats, but beneath her soft fur, she was an amazingly hard mass of pure muscle.  Petting her was an experience like petting a rock on which somebody had glued a fur coat — a rock whose rumbling purr might be mistaken for a diesel engine idling nearby.

When goats were milked, the first draw from each teat is done by hand into a “strip cup,” a kind of metal mug with a screen on top.  The screen would be checked for clots or lumps (a sign of mastitis) before the milking machines were attached.  At the end of the milking cycle, Barny would be given the strip cup.

In gratitude for this treat, Barny would first offer her catches on the stoop of the milking house to see if I wanted them before she would devour the entire thing.  This usually meant an assortment of unfortunate mice, but Barny did not shy away from bigger game, either.  An occasional rat, bird, wild turkey, a skunk (which she managed to kill without any malodorous discharge on its part) and a weasel that was easily larger than she, all appeared on the stoop.  When it was clear to her that her offering had been properly displayed, a smear of blood on the stoop and the sound of crunching bones would be the only evidence remaining.

The only thing that Barny didn’t drag off and eat was a turtle she presented on the stoop with a mixture of pride and confusion — since there was no apparent way to kill and eat the turtle.  The uncooperative turtle would hide in its shell until it thought there was no longer a threat, then it would poke out its head and legs and head for the creek.  Barny, attracted by its movement from wherever she’d wandered off to, would run over and smack it on the head, whereupon the turtle would retreat to the safety of its shell, and wait for Barny to go away again.  This cycle evidently continued all through breakfast (which was after the morning milking) when I noticed that the turtle had progressed a couple of hard won feet toward the creek, and I decided to end the cruel game by carrying the turtle to the creek myself.

It was not lost on Barny that of all her food offerings, not only was it the turtle that I finally decided that I wanted, but also that instead of eating it, I wanted the turtle to stay in the creek.  Barny concluded that part of her duties should include keeping the turtles in the creek, and I saw her later patroling the creek, smacking the heads of turtles who thought to exit the creek on the barn side.

For all her care of the goats’ food, Barny was not particularly fond of goats.  They were too big to eat, and the goat personality requires that they challenge everything and everybody — no goat would be above head-butting a cat just to be certain of their social order.  When the goats came into the barn where Barny was patrolling, Barny would leap directly into the rafters ten or twelve feet above and patrol above our heads for a while.  It was such an impressive vertical leap, and Barny handled it with such grace, power, and nonchalance, that I wasn’t above waiting until Barny was patrolling the stables before letting the goats into the barn to watch this feat again.

For her part, Barny was not above insisting upon my affection and attention at the exact moment I lifted a 100 lb. bag of grain, by reaching up and digging her claws into my jeans.  She was strong enough to hang on, riding my leg as I carried the heavy bag with both hands.  Over time, she turned it into a kind of game:  while I looked carefully around for the cat, only moving bags of grain from storage to the bins when I thought she wasn’t around, her goal, of course was to come out of nowhere and ride my leg as far as possible, usually all the way to the bins.  Judging from the holes in my jeans and the claw marks on my legs, Barny won this game a lot.


I did not have a cat when I moved into a small apartment in Lansing, Michigan, and I had no plans to get one.  Therefore nobody was more surprised than I to find a cat in the middle of my kitchen, waiting expectantly, when I got home from work.

The cat seemed so smug, so comfortable, that I was nearly persuaded that I had a cat all along and had somehow forgotten all about it.  My door was locked and my windows were closed, and I had been in the apartment for nearly a month, which ruled out the possibility that it had come with the apartment somehow.  The cat left amiably enough when I opened the front door, and that seemed to be the end of that.

When I got home from work the next day, there was the cat again, as if waiting for me to return.  Again he acted as if this was his apartment and he was my cat, this time indicating that I should open the refrigerator and cupboards.  I did, just in case (nothing was there that I did not expect, nor was there any cat food, which appeared to disappoint the cat, but only mildly.)

Again, I opened the front door, and out the cat went.

When my alarm went off in the morning, I noticed that the same cat was sleeping on my feet.  I am a notoriously heavy sleeper, the cat looked so comfortable and it felt so familiar, that it’s possible that he had been sleeping in my bed for weeks.  I dubbed him Phantom, let him out the front door and went to work.

I mentioned to a coworker, Steve, that I suddenly appear to have a pet cat, one that I don’t remember ever feeding or acquiring, who simply appears in the apartment.

Steve reacted with, “oh!  I’ve heard about the ghost cat of Lansing, but I always thought it was just a legend.  He a fiercely loyal cat who was owned by a lonely old woman who loved him.  The only time they were apart was when she went to her job at the GM plant, and on the day of her retirement, when they could finally be together all day, every day, the woman was hit by a car and died.  The cat refused to eat or leave her kitchen, died of a broken heart.  Now he appears to people who are going to die soon in car crashes.”

“What?   Really?”

“No, you idiot.  The cat’s obviously getting in somehow, there must be a hole or a cat door or something.”

I had already looked, but Steve’s theory made sense, and together we searched the apartment for holes that a cat could get through.  All the windows were locked, there were no holes in the screens, no holes anywhere that we could find.

“Huh,”  said Steve, after we found nothing.  “If that cat comes back, maybe that story I made up is true!”

The next morning, and every morning for months, I’d wake up with Phantom sleeping peacefully at the foot of my bed.  Sometimes I’d let him out, sometimes I wouldn’t bother.  I bought a little box of cat food and occasionally gave him a treat, but not enough to sustain him.  He seemed healthy and clean, so I clearly wasn’t providing his primary sustenance or care, but he seemed to spend every night with me, and the occasional weekend afternoon or evening meal.

Months and months later, I discovered his secret quite by accident.  Late at night, I woke up, got a drink and sat in the dark with my glass — the closet door just off the kitchen happened to be open, and I could see the full moon through its tiny little window.

I saw Phantom in silhouette as he gently peeled back the screen from the frame, and pushed the little window forward in its frame, then wriggled through the gap between the upper and lower sash.  When he was through, the screen and window snapped back into position.  By all appearances, the window was intact, and even casually pushing on the window and screen did not reveal the fact that it could be tilted forward just far enough to admit a small, motivated mammal.

About a week before I moved out, Phantom stopped appearing on my kitchen or my bed.  I don’t know if he sensed my imminent departure or something else happened to him, but I like to think he’s haunting somebody who could use a part time cat.

Share