Commit b44dce5
committed
perf(gribjump): fix two performance bottlenecks in the gribjump source
Avoid recomputing per-field data by caching/precomputing:
- Cache reference lat/lon when fetch_coords_from_fdb=True to avoid re-reading
the reference field's geography per retrieved field.
- Pre-convert index lists to ranges once to avoid repeated calls to ExtractionRequest.from_indices.1 parent 4acd81b commit b44dce5
File tree
2 files changed
+19
-6
lines changed- src/earthkit/data/sources
- tests/sources
2 files changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| |||
286 | 292 | | |
287 | 293 | | |
288 | 294 | | |
| 295 | + | |
| 296 | + | |
289 | 297 | | |
| 298 | + | |
| 299 | + | |
290 | 300 | | |
291 | 301 | | |
292 | 302 | | |
| |||
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
337 | | - | |
338 | | - | |
339 | 347 | | |
340 | 348 | | |
| 349 | + | |
| 350 | + | |
341 | 351 | | |
342 | 352 | | |
343 | 353 | | |
| |||
355 | 365 | | |
356 | 366 | | |
357 | 367 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
361 | 375 | | |
362 | 376 | | |
363 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
| |||
0 commit comments