December 2009 Archives

A refreshing signature

I just saw the following signature, from someone who’s not caught up in the whole paperless-will-save-the-world craze:

Notice: It is totally OK to print this email. Paper is a biodegradable, renewable, sustainable product made from trees. Growing and harvesting trees provides jobs for millions of men and women, and working forests are good for the environment, providing clean air, clean water, wildlife habitat and carbon storage. When you don’t need it anymore, be sure to put it in a bin designated for recycling, and it will come back to us as new paper or paperboard!

Rule #1 of Caching

Don’t cache something if it takes longer to retrieve it from the cache than it takes to generate it in the first place.

Corollary: Improving performance on the cache mechanism allows more stuff to be cached effectively.

This was discovered while attempting to speed up the work list and order detail pages. Fortunately, adding an index in a particular place in the database was enough to get the cache retrieval and validation to be well under a millisecond.

That, combined with roughly eight hours of tweaking code and database calls, means that an average order detail page request now only requires 182 database calls, down from 689 (74% reduction), and is generated (in most cases) in well under a second, even without touching the cache.

With the cache, it’s generated in roughly a tenth of a second (with about ten database calls for the entire request), though I still have some work to do, since it’s taking the browser between a quarter and half a second to render.

The work list load time is just under a second now, with some selective caching, down from about 2-3 seconds, using a test set of 40 active mailings. That’s fast enough for now. Database calls also dropped from 789 to 402, which is a nice bonus. At 100 active mailings, it slows down to about 1.5 seconds with the selective caching (down from about 10 beforehand), so I’ll probably need to do some more performance work once we start seeing that on a regular basis.

When "right now" isn't fast enough

Normally, my company is able to do a good job of meeting or exceeding people’s expectations for order fulfillment. We certainly try. Even during this crazy time of year, when there’s a ton of mailings, nearly all of them unusual, often under-specified, and with lots of people stressed out over sending the order a week or three later than they’d hoped, we’re keeping up (if barely, and with somewhat less sleep than usual on the part of myself and Christine, but as well as or better than past years).

Yesterday, though, an order took a turn for the strange. This particular order had been submitted the day before at 3:28pm. That’s after our mostly-unofficial cut-off for the day (3:00pm), and there were no special instructions about it being a rush, so we went through our normal practice of waiting ‘til the next morning to work on it.

Mid-morning the next day, we get an E-Mail from the customer asking how backlogged we are, how long it will take to get his letters sent, and whether it would be faster for him to send them himself. An hour later, having just talked through the (moderately complex) order with Kevin, I reply saying that we’re not backlogged, and are working on setting up his mailing now. Assuming there’s no delay in approving the order, we’d have the letters sent that day.

Nothing weird so far, but then the next E-Mail arrives. “I think I’ll send this mailing myself” (to get it out sooner). Err, what? So, I send back a reply, asking if he’s sure, and repeating that we shouldn’t have any trouble getting the mailing sent within a few hours. Maybe he’d misread the original E-Mail. But another reply comes in, saying he’s sure, so I cancel the order.

I’m guessing there must have been some other issue. It was admittedly a small list, so it’s technically possible that if he dropped everything and started work on them right away, he could have gotten the mailing sent before we would, assuming he could produce 4x6 photos at a nearby 1-hour lab with no delays during the busiest time of year, and assuming he already had a pile of the specialty reply envelopes he’d requested, along with the normal paper, envelopes, and stamps. It only would have taken us roughly 10 minutes to send his mailing, including the photo printing, but he wasn’t at the head of the queue at the time, so it would’ve been an hour or two before it got to the printing stage.

Even so, it wouldn’t have mattered — at least in this area, it makes no difference if I mail something at 7am or 8pm; it’ll still go out that day in the ~11:30pm truck. I assume the same is true where he lives (if anything, he’d probably have a 5pm cutoff), and his recipients were spread out around the country, such that there wouldn’t be any major savings geographically.

That one may very well take the cake for oddest customer interaction of the year.

Recent Entries

Who's on first?
I’m going through the settings of a hard-core E-Mail program, and came across this lovely setting: Copy To Address to…
USPS Extreme Cost-Saving Measures
In the July 2010 edition of the PCC Insider (a USPS publication) is found the following statement: There are 26,000…
At 1:15am this morning
At a hotel, after a day of eventful travel and 3.5 hours of sleep the night before, it’s (almost) needless…
My Amazon.com Wish List