Commit Graph

581 Commits

Author SHA1 Message Date
Sean Rhea
d3b1a62af3 reduce memory footprint of StressCalculator
After processing each RideItem, call freeMemory to deallocate the RideFile
object inside it, since we're done with the RideFile once we have the
BikeScore.  Also call computeMetrics instead of htmlSummary, since we only
need the BikeScore and computeMetrics is faster.

After computing the stress cache from scratch on Sean's ride library
(3 years of rides), this change reduces the process virtual memory size
(VSIZE) from 769 MB to 412 MB.  Even more dramatically, it reduces the
resident set size (RSIZE) from 389 MB to 36 MB!

On Sean's MacBook, which has 4 GB of RAM, this change results in a modest
reduction in the time to compute the stress cache, from 17 seconds down to
14.  On machines with more limited memory footprints, or when dealing with
a larger ride library, the speedup could be very dramatic.  (Once the
process starts paging, it's going to crawl.)

Now that it only takes 14 seconds to calculate, it's really not clear to
me that we need store the stress cache on the filesystem at all.
2009-10-25 17:40:34 -04:00
Sean Rhea
0d45c46a2a add computeMetrics and freeMemory functions
computeMetrics computes the RideMetrics without building up the htmlSummary.
freeMemory frees the rideFile object associated with this ride.
2009-10-25 17:40:03 -04:00
Sean Rhea
b144b5ec48 assert.h to make Linux happy 2009-10-24 14:19:48 -07:00
Justin Knotzke
08c232d70b Filtering of data in Critical Plot based on Seasons
Based on the defined dates per season, CP displays all plot only
for that Season.
2009-10-22 21:45:07 -07:00
Justin Knotzke
c630d281d3 Added Season support via xml file.
Using seasons.xml, support now for a season name, start date and end date.

Fixed some memory leaks.
2009-10-22 21:45:03 -07:00
Mark Liversedge
5acf35d542 fix angle brackets in include
They break the build on win32.  Use quotes instead.
2009-10-18 18:40:22 -07:00
Justin Knotzke
f8e9227c99 Support for Qollector in Critical Power Plot
is_ride_filename wasn't filtering for qla files.
2009-10-18 08:32:11 -07:00
Eric Murray
617f034fa3 fix PM to use exp weighted avg
Also limit decimal places in STS, LTS, and SB display fields.
2009-10-16 20:46:30 -07:00
Sean Rhea
46d026674f drop ancient PowerAgent compatibility mode
This old compatibility mode was only used to verify that we could match the
output of an old version of PowerAgent, and it hasn't been used in GC in a
long time.  I can't see us ever using it again, either.
2009-10-10 12:35:35 -04:00
Sean Rhea
318c9debd4 put all our unit conversions in one header file 2009-10-10 12:27:42 -04:00
Sean Rhea
f449fbaaaf sort file names -- no functional change 2009-10-10 08:58:48 -04:00
Eric Murray
c28591142b add performance monitor 2009-10-08 16:42:55 -04:00
Sean Rhea
abf4b74cc3 abstract "Critical Power Plot" tab into its own class 2009-10-07 09:47:17 -04:00
Sean Rhea
7c90677655 minor AllPlotWindow cleanup 2009-10-07 08:20:35 -04:00
Sean Rhea
7aa858cf02 abstract "Weekly Summary" tab into its own class 2009-10-07 08:10:26 -04:00
Justin Knotzke
a7a81b53c5 Added missing recIntSecs to Qollector
The interval time was not being recorded.
2009-10-05 09:24:48 -04:00
Mark Liversedge
18068b1cae more WKO file constants
New optional padding data 0x0e 0x80 and data cache marker 0x1d 0x80.
2009-10-05 09:20:12 -04:00
Sean Rhea
29368cbbdb don't plot points before first smoothing interval
Otherwise, the zeros we average distort the starting values.
This effect is particularly noticeable with altitude.
2009-10-04 06:32:25 -04:00
Sean Rhea
51bc450448 include assert.h in HistogramWindow.cpp 2009-10-03 21:57:02 -04:00
Sean Rhea
28c0b8e221 remove some calls to saveAndOpenNotes
I don't think that our zones or CP changing should require re-opening the
notes file.  Only changing which ride is selected should do so.

This commit is the follow-on to a85c4f.  Please review.
2009-10-03 21:54:27 -04:00
Sean Rhea
a85c4fae65 unfuck generateWeeklySummary/saveNotes confusion
I have no idea why we were saving the current notes file and opening a new one
every time we called generateWeeklySummary, but it seems totally wrong to me.
This commit merely separates the two concerns into two separate functions,
generateWeeklySummary and saveAndOpenNotes, and calls the latter everywhere
the former is already called.  As such, there should be no functional change.
We can work out whether we should really be saving (possibly empty) notes
files in all these places as part of a future commit.
2009-10-03 21:46:06 -04:00
Sean Rhea
18916aea7f abstract "PF/PV Plot" tab into its own class 2009-10-03 21:01:47 -04:00
Sean Rhea
5b8837a423 abstract "Histogram Analysis" tab into its own class 2009-10-03 19:16:30 -04:00
Berend De Schouwer
de96ee2f16 fix PowerHist zoom out with a call to setZoomBase 2009-10-03 18:13:09 -04:00
Berend De Schouwer
6744d4ad98 fix AllPlot zoom out with a call to setZoomBase 2009-10-03 18:11:00 -04:00
Berend De Schouwer
6692e6daad fix CSV date autodetect
There were some missing calls to set Qt::CaseInsensitive.
2009-10-03 18:06:37 -04:00
Sean Rhea
03666b478e take qwtconfig.pri out of git
Provide a qwtconfig.pri.in that you copy to qwtconfig.pri, instead.
2009-10-03 17:57:22 -04:00
Ned Harding
5c20f8340f remove qwt5.dll from windows install
...since it is now staticly linked.
2009-10-02 11:44:08 -04:00
Mark Liversedge
b08bd55b1b add additional wko padding value
...including test file from Jim Baker.
2009-10-02 09:31:23 -04:00
Justin Knotzke
ec05ca5dfc fix typo in QuarqParser
"Watts" shouldn't be capitalized.
2009-10-01 10:10:22 -04:00
Justin Knotzke
96cdb4ebd9 fix interval '9' bug in QuarqParser
I'm assuming this was a typo.  '9' should be '0'.
2009-10-01 10:10:22 -04:00
Mark Liversedge
6dca518fff more messing around with dates in ride import
- Allow user to edit any file date during import.
- WKO reader uses filename date over metadata in the file after import.
2009-09-30 08:59:59 -04:00
Sean Rhea
5ab5bc7010 move bikescore up in ride summary
...so that the intervals summary is "above the fold".  That may be a little on
the wide side for small screens, but it's still less wide than the intervals
summary, so it's not the worst offender in that regard.
2009-09-28 19:52:05 -04:00
Sean Rhea
3e9905565b add Eric Murray to list of contributors
It's pretty inexcusable that I forgot this before.  I'm sorry, Eric!
2009-09-28 14:47:23 -04:00
Sean Rhea
ab96f78050 abstract "Ride Plot" tab into its own class 2009-09-27 21:40:03 -04:00
Sean Rhea
b53be32172 less public variables in AllPlot
Also clean up includes and pre-declared classes.
2009-09-27 21:11:53 -04:00
Sean Rhea
a18fea04c7 allocate MetricAggregator on stack 2009-09-27 20:16:55 -04:00
Sean Rhea
8f221b4b71 use QSharedPointer for daily RideMetrics 2009-09-27 20:11:44 -04:00
Sean Rhea
f911ffa9c1 use QSharedPointer for weekly RideMetrics 2009-09-27 20:05:20 -04:00
Sean Rhea
e7e34c107e use a QVector for time_in_zone 2009-09-27 20:00:47 -04:00
Thomas Weichmann
47cc777b04 allow for less wide MainWindow
- Moved Allplot time/distance combobox down next too smoothing slider.
- Rotated allplot plot scale lables to save a little space.
2009-09-27 13:14:17 -04:00
Greg Lonnon
97cb66c128 added smart recording support to TcxParser.cpp
The recording interval can vary. If the recording interval is not 1
second, then the data is linearly interpolated for the time period at
1 second intervals. This allows for smart recording or garmin 705 data
drops to work correctly with GC.
2009-09-27 13:05:09 -04:00
Jamie Kimberley
a15904937d powertap .csv file with speed/cad/hr/power data
Powertap .csv file containing data for speed, cadence, hr, and power.
2009-09-26 16:28:23 -04:00
Jamie Kimberley
a377206c43 Powertap .raw file with speed/cad/hr/power data
Powertap .raw file containing data for speed, cadence, hr, and power.
It also has a few intervals markers which may be useful for verifying
that we handle intervals correctly.
2009-09-26 16:28:23 -04:00
Jamie Kimberley
350cc0ee96 Powertap .raw file with speed/cad/hr, no power
Powertap .raw file generated when using the powertap as a cyclecomputer.
it contains data for speed, cadence, HR but no data for power.
2009-09-26 16:28:23 -04:00
Mark Liversedge
850213b968 report errors up from WkoRideFile 2009-09-26 16:15:59 -04:00
Berend De Schouwer
f3cb9c6fab do not load wko files with zero records
Includes a test wko file that previously caused a crash.
2009-09-26 16:15:06 -04:00
Greg Lonnon
6406973cc0 fix the flashing windows on startup
As it turns out, the show call for tab widgets are handled by the tabwidget
container, so we don't need to call them explicitly ourselves.
2009-09-26 16:00:57 -04:00
Mark Liversedge
f28c360ff5 Parse ergomo csv filenames for date 2009-09-21 21:57:31 -07:00
Mark Liversedge
bff774ad82 Allow upper and lower case suffixes in filenames when importing 2009-09-21 21:57:31 -07:00