Batch per-location reads in from_res1d instead of one to_dataframe() per location
- Dominant language
- Python
- Stars
- 56
- Forks
- 9
- Avg merge
- 57m
- Merged PRs (30d)
- 3
Description
Follow-up from #679.
`_load_res1d_network` reads each selected location separately: `_simplify_colnames` calls
`node.to_dataframe()` per node and per boundary gridpoint, and `Res1DReach` does the same per
populated gridpoint. Each call crosses the pythonnet/.NET boundary on its own.
mikeio1d exposes a batched form, `res.read(queries)`, taking a list of `TimeSeriesId`. A test user
measured ~0.5 s for 50 sensors that way, versus a per-trial cost of 18–25 s for a full build today.
Worth checking whether routing the selected locations through one batched read is faster than the
current per-location reads, and how it interacts with the `quantities` filter added in #679.
Contributor guide
Research direction
Trace _load_res1d_network, _simplify_colnames, and Res1DReach to map the current per-location to_dataframe() calls. Compare them with mikeio1d res.read(queries), including the quantities filter from #679. Done means establishing whether batching improves the measured load time and documenting how the filter behaves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100