mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix Mass Import Memory Exhaustion
.. don't signal when adding a ride, which kicks off all manner of updates across the code, instead we let the metric refresh kick in at the end. .. this is great for an initial load and mass import of large numbers of rides, but sucks for a small number of rides when maybe downloading .. we could make the signalling dependent on the number of rides being imported, so small number still updates the CP charts etc. THIS IS A TEMPORARY FIX TO THE MORE SIGNIFICANT PERFORMANCE ISSUE -- BUT WE DO NEED TO CONSIDER THE ISSUE OF CHART UPDATES
This commit is contained in:
@@ -825,7 +825,7 @@ RideImportWizard::abortClicked()
|
||||
tableWidget->item(i,5)->setText(tr("File Overwritten"));
|
||||
} else {
|
||||
tableWidget->item(i,5)->setText(tr("File Saved"));
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), true);
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,7 +870,7 @@ RideImportWizard::abortClicked()
|
||||
QFile source(filenames[i]);
|
||||
if (source.copy(fulltarget)) {
|
||||
tableWidget->item(i,5)->setText(tr("File Saved"));
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), true); // add to tree view
|
||||
context->athlete->addRide(QFileInfo(fulltarget).fileName(), false); // add to tree view
|
||||
// free immediately otherwise all imported rides are cached
|
||||
// and with large imports this can lead to memory exhaustion
|
||||
// BUT! Some charts/windows will hava snaffled away the ridefile
|
||||
|
||||
Reference in New Issue
Block a user