Arman's stuff
Thinking About Change

(Sun Jun 28 23:17:58 2009)

On the one side, there's the Blag.

After creating the static pages, I've realized that my script is *really* slow. I'm not sure how much is due to the old hardware, and how much is due to it being a perl script so big it actually has mass, but I know something needs to change. The trouble is, I'm not completely sure how to figure out what needs the speed; is the script too big? Is the database too slow? Does the script make bad database calls, and thus slow things down? I'm not sure.

Recently, I had to redesign some programs at work, shaving bare microseconds off a routine. I was successful, to a degree; I cut the operation time in half. However, it was pretty easy to track that time, and know exactly what parts were slow. I knew, because there were no database calls, no compile times, and no internet lag. It was a precompiled program, running off my own hardware, with an oscilloscope reading the timings. This? Maybe it takes a while to compile a big script. Maybe it takes a while to make a few database calls. Maybe it's nothing to do with the database, the script, or even the network. That's the thing, though. This is all new to me; I programmed in Perl, because I knew the power of it, and I knew the language.

So there's a few choices. I could leave it as it is, and hopefully upgrade the hardware in the future. I could put all sorts of timers in the script, and try to shorten the longest parts. I could "fly blind," and just remove any parts I deem slow. I could even replace the script entirely, with a large collection of smaller scripts, a very large collection of static HTML pages, or even a program in a different language - compiled C, Python, PHP. Heck, I could write it as an ASP page in VB.NET. That would be a hoot, for sure.

Right now, I'm going to watch and see. I know there are pieces of my script that are slow, even poorly written; I think first, I'm going to attempt to rewrite my code to use fewer database calls and quicker response time.

Sigh... I never liked databases. The calls are all so... foreign. Ah well, such is the price of writing your own software, eh?

<< A Little More WorkTest the Tags >>

This blag is tagged: Blag, Perl, All