Commit 1d60fbd
authored
Add memory guard to cost_distance iterative Dijkstra + da.block assembly (#1119)
* Add sweep-performance design spec
Parallel subagent triage + ralph-loop workflow for auditing all
xrspatial modules for performance bottlenecks, OOM risk under
30TB dask workloads, and backend-specific anti-patterns.
* Add sweep-performance implementation plan
7 tasks covering command scaffold, module scoring, parallel subagent
dispatch, report merging, ralph-loop generation, and smoke tests.
* Add sweep-performance slash command
* Add memory guard to cost_distance iterative Dijkstra + use da.block (#1118)
- Add memory guard before _preprocess_tiles: estimates ~3x dataset
(source + friction cache + result) and raises MemoryError if it
would exceed 80% of available RAM, suggesting finite max_cost.
- Replace np.concatenate assembly with da.block to avoid building a
monolithic numpy array from tile results. Tiles are now wrapped in
dask.delayed and assembled lazily.1 parent 74a6da9 commit 1d60fbd
1 file changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
919 | 937 | | |
920 | 938 | | |
921 | 939 | | |
| |||
970 | 988 | | |
971 | 989 | | |
972 | 990 | | |
973 | | - | |
974 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
975 | 999 | | |
976 | 1000 | | |
977 | 1001 | | |
| |||
987 | 1011 | | |
988 | 1012 | | |
989 | 1013 | | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
994 | 1021 | | |
995 | 1022 | | |
996 | 1023 | | |
| |||
0 commit comments