File Size (Feb 11, 2025)

There’s a saying for construction work: cheap/fast/good, pick any two.

It also applies when writing software for accounting. TurtleSoft is not rolling in money like the early to mid 1990s, so this time around we had to go for cheap/slow/good rather than cheap/fast/bad.

One issue we still need to decide on is file size. For that, the choice is more like fast/small/reliable, pick any two.

The NeoAccess database we used for Goldenseal was fast & small, and not reliable. We had to rewrite their code in order to make software good enough to sell. It made files bigger. Some of that was because we added sanity-check data to the indexes that kept track of where each record is located. We also added a second place to store record addresses: a list sorted by file location instead of a binary tree. That way, if the Neo code lost track of a record, we could still find it and repair the damage.

For the new accounting software, we used the same ideas, but added a few more to make the database even more reliable. It has a price. An empty Goldenseal file starts out at 106K. The new app currently starts at 14 megs, over 100x bigger.

Much of the extra bulk comes from a design decision. Any record database needs to keep lists of where records are located in the file: it’s called an index. There are over 200 record classes, and each gets its own index.

NeoAccess started a new index the first time you used a class. It went at the end of the file. Once an index had 8 records, another index went at the end (later we upped that to 32). Their approach was frugal with both RAM and disk space, but the result was indexes scattered throughout the file. They were hard to locate, and fragile. One stray bit change in an index could destroy a big chunk of the file.

The new app starts with 200+ empty indexes at the beginning of the file, even if you don’t ever use them. Doing that adds to file size, but it makes repair easier. We know exactly where everything is. Right now the indexes are big enough that the “tree” of indexes is not very deep. We can shrink them, but it will make things slower and a bit less reliable.

Another index tracks the contents of each file sector. More empty space at start-up. We also can shrink that, with similar consequences.

Goldenseal is a monster. It does all sorts of things: construction estimating, accounting, project management, rentals, sales, contract writing. Most users don’t need all that. We really need to pivot to smaller, cheaper apps that just do one or two things. Those users probably won’t like to start with a 14 meg file.

This is one of several quandries we are still working on, in the time left before first release. There are many things we can do to reduce file size, but it’s a matter of weighing the costs.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.