I heard from Zach that he found a setting in AXware to save the results file automatically every X runs, so hopefully that will take care of the repetitive Ctrl+S that I've been asking T&S workers to do. Maybe he can chime in on that. Thanks Zach!
I've also been working on improving the way driver and run data is stored and retrieved. The current storage reads a file saved by AXware (which is in a format that's a hassle to read; some lucky souls may have heard me bitching about underscore-delimited key-value pairs) and duplicates most of the data into a format which isn't a hassle to read. In order to read the data out of the AXware file, I had to write some really custom code (
AxIr_Parser_StateFileLine for the curious) that I thought would cause a big performance hit, since it's kind of convoluted and its methods would be called thousands of times whenever it's needed. So I didn't want to have to hit it on every page load. I thought, "surely just reading records out of a database will be way faster than this mess".
When you visited the app for the first time since T&S saved the file, you may have noticed it took a long time to load, and then was a lot more responsive when you started clicking links. I hadn't profiled that code to find out where that performance hit actually was, assuming it was due to reading the state file. It turns out it comes from writing out the database instead; time spent in AxIr_Parser_StateFile line is minuscule by comparison. It also turns out that the file I originally looked at as a hassle to read is no longer a such a pain when I use the StateFileLine class to deal with it. And I found a way to improve StateFileLine's performance by about 30%^H^H^H45%.
Based on some preliminary testing, I think I can eliminate almost all of the database writes that contribute to that slowdown once every few minutes, keep all the records absolutely up to date (without relying on the auto-save every X runs feature), and pay essentially no performance penalty in terms of page load time.
Oh yeah this is in the autocross forum. Time to go rewrite a pile of code why??? Because race car