Conversation
There was a problem hiding this comment.
Pull Request Overview
Optimizes persistent data loading performance by implementing lazy loading for households and changing the database query strategy to reduce unnecessary data fetching. The changes eliminate loading all related households and nested entities upfront, instead only loading them when a matching persistent table is confirmed to exist.
- Changed households fetch strategy from EAGER to LAZY with SUBSELECT mode
- Split database query into two phases: first check for existence, then lazily load households if found
- Removed unnecessary JOIN operations from initial query to reduce database load
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| SimPathsModel.java | Modified getProcessed method to use two-phase lazy loading approach |
| Processed.java | Changed households fetch type from EAGER to LAZY with SUBSELECT optimization |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Everything works smoothly on my machine. The branch can be merged into |
|
Hi Andy, I tested the model with the different start years - everything works well (no more slow loading of the initial populations). |
What
Why