mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Fix RideFileCache threaded db access
The call to RideFile::getWeight() in RideFileCache computation ends up with a call the read the measures table in the DB. This is BAD since it is called from a thread. We now call getWeight() in the metric aggregator before launching the ridefilecache computation -- this will cache the weight and avoid db access. I've also removed the duplicate code in the w/kg metric code too and it should be marginally faster at computing metrics now. BIG THANKS TO ILJA BOOIJ FOR HIGHLIGHTING THIS, DESPITE MY INITIAL SCEPTICISM. I OWE HIM A PINT (OR TWO) :) Fixes #604
This commit is contained in:
@@ -63,8 +63,9 @@
|
||||
// 44 19 Apr 2013 Mark Liversedge Aerobic Decoupling precision reduced to 1pt
|
||||
// 45 09 May 2013 Mark Liversedge Added 2,3,8 and 90m peak power for fatigue profiling
|
||||
// 46 13 May 2013 Mark Liversedge Handle absence of speed in metric calculations
|
||||
// 47 17 May 2013 Mark Liversedge Reimplementation of w/kg and ride->getWeight()
|
||||
|
||||
int DBSchemaVersion = 46;
|
||||
int DBSchemaVersion = 47;
|
||||
|
||||
DBAccess::DBAccess(MainWindow* main, QDir home) : main(main), home(home)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user