I may have finally got to the bottom of some slow-running code at work. After trying a variety of things to speed it up, I decided to do what I should have done in the first place, and pasted a version of the troublesome module into a script, with all the functions made public so I could run it against the production cluster a bit at a time to narrow down exactly where the bottleneck was. Without a huge amount of work I pinpointed it to one function, then noticed that instead of pulling out just the failed results from a big list and creating a struct from each, it was creating structs for everything, then filtering the list of structs. Switching two lines of code into the order they should have been in the first place sped it up by a factor of about 30.
Fat Cat meet-up again on Wednesday, with Anders, Tony, Mel, Rupert, Joe and Dave.
My smart water meter was activated this week, and immediately triggered a warning that I seem to have a leak, so that’s another annoying thing to get fixed. There’s nothing obvious going on in the house, so my money’s on the pipe that goes under the garden (somewhere!) to the garage. Sigh.
The Tarpley 20 was on Sunday, and I managed a personal worst, coming in three or four minutes slower than last year, which itself was a six or seven slower than 2024. Ah well, still seven weeks until the marathon!