Commit 10d3366
Address review: project curves column only when displayed (LMFDB#6975)
The curves column is default-off but was added to the fixed db_cols
projection, so every abvar/Fq search (and every download) fetched and
deserialized the full curve arrays that the user never sees - up to
~2.2MB on the worst realistic browse page (g=2, q=167).
Drop "curves" from the static db_cols and fetch it only when the column
is actually shown: the search sets __projection__ to include curves when
curves_requested(info) is true, and AbvarFq_download overrides a new
Downloader.get_projection hook (a behavior-preserving extraction of the
existing projection logic) to add curves only when it is in the download.
Verified with the flask test client: default searches/downloads no longer
project curves (worst page drops from 33 to 32 columns, saving 2.2MB),
while showcol=curves still displays and downloads the equations; all 20
abvar tests plus number-field and ECNF download tests pass; pyflakes clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 0f78401 commit 10d3366
3 files changed
Lines changed: 36 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
718 | 726 | | |
719 | 727 | | |
720 | 728 | | |
| |||
742 | 750 | | |
743 | 751 | | |
744 | 752 | | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
745 | 756 | | |
746 | 757 | | |
747 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
608 | 622 | | |
609 | 623 | | |
610 | 624 | | |
| |||
705 | 719 | | |
706 | 720 | | |
707 | 721 | | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
| 722 | + | |
714 | 723 | | |
715 | 724 | | |
716 | 725 | | |
| |||
0 commit comments