.. RideCache::addRide() deletes the prior ride, which is rather meaningless
if you are just importing a ride, but when syncing large numbers
of rides will stop memory being exhausted.
.. similarly in the FileStoreSyncDialog we now free up the memory
used to read the downloaded files before moving on to the next.
.. since interval discovery impacts load time (reading from backing
store) and refresh time (computing metrics for intervals) we do
not search for PEAK power/pace by default.
.. if the user wants that info (which is of limited value) then they
can switch it on in preferences/options.
.. should help to reduce performance overhead for startup and refresh
especially as an experience immediately after upgrading to v3.2
.. select which kind of intervals we want
.. makes it faster and also reduces the size of
the rideDB.json file quite dramatically which
may be useful for some users.
.. the lazy delete was a horrible hack and memory leak.
So, now the paint delegate no longer dereferences the
IntervalItem * from the QTreeWidgetItem.
Instead we use setData for UserRole+1 to store the interval
color when constructing the trees. The paint function can
get this directly and we avoid any contention when the
intervals are deleted and created.
The lazy delete can be removed and deleted once the changes
have been notified via intervalsUpdate().
.. since they are deleted in threads and affect the gui
.. to avoid the overhead of cross-thread mutex we just
delete intervals lazily; each time we refresh them
the last lot are wiped away.
.. SEGV on setting CP when no zones configured. Since
RideItem::updateIntervals() dereferenced a range
when CP is set, but none existed.
.. fixup use of Metadata field "W'" to override settings
in Metrics tab.
.. we now filter sustained efforts by zone rather than picking
the very best non-overlapping effort.
.. this means that a L7 sprint mid way through a L4 climb within
a L3 ride will find find 3 sustained intervals rather than just
the sprint.
.. just place TTE, EFFORTS and SPRINTS under
the EFFORTS interval type.
.. this is getting ready for handling overlapping
efforts rather than just the very best.
.. Route segments are found during interval refresh
.. Config/routes.xml only holds config now
.. The fingerprint for a rideitem includes the route
fingerprint now so it will refresh automatically
when the routes config changes
.. if no routes are defined then no work is done, so the
amount of work is really defined by the user
NOTE: RouteWindow, and now, RouteItem will need to
be reworked and fixed up for v4.0
.. by introducing a specific signal to trigger it.
.. its very specific, but its more flexible (and a lot less
work) than adopting a model for the QTreeView that would
be a better 'architecture'.
.. the integrated joules and resampling to 1sec code
was not taking into account the first sample is 0 seconds
and was incrementing 1 sample early too.
As a result the integrated series was 2seconds ahead of the
recorded data, meaning the discovered efforts and sprints
would have a start time 2 seconds ahead of where they
should have been.
.. so we can keep a reference to the user interval
in a ridefile from the rideitem and not worry about
trying to match or handle index offsets into the array
.. this is required to fixup the relationship between
an IntervalItem and a RideFileInterval in RideItem
and RideFile respectively.