Skip to content

Commit

Permalink
Memory reduction for the forecasting engine
Browse files Browse the repository at this point in the history
  • Loading branch information
jdetaeye committed Jan 10, 2024
1 parent e578ff8 commit c6ebe1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/forecast/forecast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ PyObject* ForecastBucket::create(PyTypeObject* pytype, PyObject* args,
// increases. The loading time goes up quadratically: need to read more
// buckets + each bucket takes longer
for (auto& bckt : data->getBuckets()) {
auto fcstbckt = bckt.getOrCreateForecastBucket();
if (!fcstbckt) continue;
if (fcstbckt->getDueRange().within(startdate)) {
if (bckt.getDates().within(startdate)) {
auto fcstbckt = bckt.getOrCreateForecastBucket();
if (!fcstbckt) continue;
// Iterate over extra keywords, and set attributes.
PyObject *key, *value;
Py_ssize_t pos = 0;
Expand Down

0 comments on commit c6ebe1d

Please sign in to comment.