Nov. 13th, 2007

billroper: (Default)
I've been bashing on the problem of speeding up our calculations here at work. The obvious solution is to perform some type of minimal recalc, so that you don't calculate numbers whose predecessors haven't changed.

But to implement that, you need a dirty flag. And while I had a place to store it for our lineitem variable types, I had no place to store it for the scalar variable types. And while I could have hacked something in, it made more sense to actually rationalize some of the infrastructure around our storage of scalar values so that I can add some new features there later rather than to keep piling things on so that the later conversion would be even more difficult.

That bunch of coding took a couple of weeks. I finished it up on Friday.

Today, I got minimal recalc working. I needed to change the way that we initialize our calculation order so that it was optimized for minimal recalc, but once that was done, the calculations were much faster, as I'd expected that they'd be.

This only helps when you're calculating the same scenario over and over again, but that's a pretty common use case. And it'll do for now. :)
billroper: (Default)
I've been bashing on the problem of speeding up our calculations here at work. The obvious solution is to perform some type of minimal recalc, so that you don't calculate numbers whose predecessors haven't changed.

But to implement that, you need a dirty flag. And while I had a place to store it for our lineitem variable types, I had no place to store it for the scalar variable types. And while I could have hacked something in, it made more sense to actually rationalize some of the infrastructure around our storage of scalar values so that I can add some new features there later rather than to keep piling things on so that the later conversion would be even more difficult.

That bunch of coding took a couple of weeks. I finished it up on Friday.

Today, I got minimal recalc working. I needed to change the way that we initialize our calculation order so that it was optimized for minimal recalc, but once that was done, the calculations were much faster, as I'd expected that they'd be.

This only helps when you're calculating the same scenario over and over again, but that's a pretty common use case. And it'll do for now. :)

Profile

billroper: (Default)
billroper

July 2025

S M T W T F S
   1 2 3 4 5
6 7 89101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 9th, 2025 12:46 pm
Powered by Dreamwidth Studios