TurtleSoft’s first construction estimating software was a 300K Excel spreadsheet. It was about maximum file size for the Mac Plus it ran on. Loading took 20 minutes, so a progress bar was vital. After opening an estimate, I’d go outside, split/stack firewood, and watch the bar through the window.
For our new estimating/accounting app, a progress bar is less important. Chips and storage are 1000x faster these days, so most things only take a second or less.
However, the past week our staff has been testing and debugging reports. Those can be big enough to still need a progress bar. So we finally hooked up the built-in bar at the bottom of the window. Most times it just flashes, but reports with thousands of records take a few seconds to load.
A permanent progress bar is much safer. Goldenseal pops up a separate window, which has caused all sorts of problems over the years. Too easy to show multiple windows, or leave the bar dangling after the action finished, or remove it twice and crash. Sometimes the progress window would intercept messages meant for something else.
The new system has none of those flaws. It’s also just 18 lines of code instead of 200.
While testing reports, we noticed that using a date range didn’t go any faster. That was odd. It should look at fewer items if you only want the current year. The Find command is speedy when you search for dates or other common data. That happens because we index the most important fields. Reports ought to use indexing, also.
We stepped through code in the debugger, and discovered the problem. Reports loop through records with some ugly 1970s-ish code, inherited from the NeoAccess database. It’s hard to understand, and impossible to modify. There’s no choice but to open every record, every time. There was a comment dated 2004: “some day we should replace this mess”.
Last week, we did. It took a complete rewrite, but the new code is faster and easier to maintain. One more piece of ancient cruft is on the way out. It’s also used in a couple other places, but we’ll zap those soon.
Our staff just ended a 3 month break from programming, while selling a house and moving the office. It’s easy to accumulate stuff when staying in one building for a decade or three. There’s still one more move in the future, but that should only take a week or two.
Dennis Kolva
Programming Director
TurtleSoft.com