Skip to content

Commit 4ac827a

Browse files
committed
Remove redundant loading of .osrm.cell_metrics
When using process memory, MLD cell metrics are loaded twice from .osrm.cell_metrics - once when loading static data, and again when loading updatable data. The former appears to be the mistake, as .osrm.cell_metrics is only listed in `GetUpdatableFiles`.
1 parent def699d commit 4ac827a

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Misc:
44
- FIXED: Upgrade to @mapbox/node-pre-gyp fix various bugs with Node 12/14 [#5991](https://github.com/Project-OSRM/osrm-backend/pull/5991)
55
- FIXED: `valid` type in documentation examples [#5990](https://github.com/Project-OSRM/osrm-backend/issues/5990)
6+
- FIXED: Remove redundant loading of .osrm.cell_metrics [#6019](https://github.com/Project-OSRM/osrm-backend/issues/6019)
67
- Profile:
78
- FIXED: Add kerb barrier exception to default car profile. [#5999](https://github.com/Project-OSRM/osrm-backend/pull/5999)
89

src/storage/storage.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,6 @@ void Storage::PopulateStaticData(const SharedDataIndex &index)
489489
partitioner::files::readCells(config.GetPath(".osrm.cells"), storage);
490490
}
491491

492-
if (boost::filesystem::exists(config.GetPath(".osrm.cell_metrics")))
493-
{
494-
auto exclude_metrics = make_cell_metric_view(index, "/mld/metrics/" + metric_name);
495-
std::unordered_map<std::string, std::vector<customizer::CellMetricView>> metrics = {
496-
{metric_name, std::move(exclude_metrics)},
497-
};
498-
customizer::files::readCellMetrics(config.GetPath(".osrm.cell_metrics"), metrics);
499-
}
500-
501492
// load maneuver overrides
502493
{
503494
auto views = make_maneuver_overrides_views(index, "/common/maneuver_overrides");

0 commit comments

Comments
 (0)