Commit 478b9bd
authored
perf: Speed up media_names_for_ankihub_deck (#1380)
* Use .iterator() in media_names_for_ankihub_deck() to avoid holding rows
in memory
* Extract media names from AnkiHub DB instead of collection
* Fix tests
* Avoid scanning the notes table twice and use .tuples()
* Revert "Extract media names from AnkiHub DB instead of collection"
This reverts commit bf3e891.
* Clarify why a collection scan is needed.1 parent 8a14bfb commit 478b9bd
3 files changed
Lines changed: 44 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
453 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
454 | 458 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
471 | 468 | | |
472 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
340 | 344 | | |
341 | 345 | | |
342 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8479 | 8479 | | |
8480 | 8480 | | |
8481 | 8481 | | |
| 8482 | + | |
8482 | 8483 | | |
8483 | 8484 | | |
8484 | 8485 | | |
| |||
8504 | 8505 | | |
8505 | 8506 | | |
8506 | 8507 | | |
8507 | | - | |
8508 | | - | |
| 8508 | + | |
| 8509 | + | |
| 8510 | + | |
| 8511 | + | |
| 8512 | + | |
| 8513 | + | |
| 8514 | + | |
8509 | 8515 | | |
8510 | 8516 | | |
8511 | 8517 | | |
| |||
8567 | 8573 | | |
8568 | 8574 | | |
8569 | 8575 | | |
| 8576 | + | |
8570 | 8577 | | |
8571 | 8578 | | |
8572 | 8579 | | |
| |||
8603 | 8610 | | |
8604 | 8611 | | |
8605 | 8612 | | |
8606 | | - | |
8607 | | - | |
| 8613 | + | |
| 8614 | + | |
| 8615 | + | |
| 8616 | + | |
| 8617 | + | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
8608 | 8623 | | |
8609 | 8624 | | |
8610 | 8625 | | |
| |||
0 commit comments