Repository navigation
Commit ce2ba50
committed
perf: root-cause fixes for fork-origin DeusData#3 (purge) + DeusData#8 (dep N+1)
DeusData#3 — incremental purge was O(C·(N+E)): cbm_gbuf_delete_by_file was called
once per changed/deleted file, each a full nodes+edges scan. Add
cbm_gbuf_delete_by_paths (one pass over nodes matching a path membership
set + one edge cascade = O(N+E) regardless of path count); refactor
cbm_gbuf_delete_by_file to delegate to it (DRY — single implementation).
pipeline_incremental.c now purges all changed+deleted paths in one call
(OOM fallback keeps the old per-file path). graph_buffer 49 + incremental
purge tests pass; only the known B1 full-reindex failures remain.
DeusData#8 — cbm_dep_link_cross_edges was N+1: one cbm_store_search per import
(<=500) to find a matching dep Module. Now ONE bulk fetch of all dep Module
nodes + an in-memory name->id hash (first-wins, preserving limit=1
semantics) -> O(1) per import. depindex 32 pass.
DeusData#5 verified NOT a bug (avoided a false fix): node_degree IS populated by
cbm_pagerank_compute (pagerank.c:422 INSERT OR REPLACE INTO node_degree);
the correlated-subquery fallback only fires pre-PageRank.1 parent 2ac5f21 commit ce2ba50
4 files changed
Lines changed: 107 additions & 40 deletions
File tree
- src
- depindex
- graph_buffer
- pipeline
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
| |||
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
521 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
522 | 554 | | |
523 | | - | |
| 555 | + | |
524 | 556 | | |
525 | 557 | | |
526 | 558 | | |
527 | 559 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
554 | 571 | | |
555 | 572 | | |
| 573 | + | |
| 574 | + | |
556 | 575 | | |
557 | 576 | | |
558 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
755 | 783 | | |
756 | | - | |
757 | 784 | | |
758 | 785 | | |
759 | 786 | | |
760 | 787 | | |
761 | 788 | | |
762 | 789 | | |
763 | 790 | | |
764 | | - | |
| 791 | + | |
765 | 792 | | |
766 | 793 | | |
767 | 794 | | |
| |||
772 | 799 | | |
773 | 800 | | |
774 | 801 | | |
775 | | - | |
776 | 802 | | |
777 | 803 | | |
778 | 804 | | |
779 | | - | |
780 | 805 | | |
781 | 806 | | |
782 | 807 | | |
783 | 808 | | |
784 | 809 | | |
785 | | - | |
786 | | - | |
787 | 810 | | |
788 | 811 | | |
789 | 812 | | |
790 | 813 | | |
791 | 814 | | |
| 815 | + | |
| 816 | + | |
792 | 817 | | |
793 | 818 | | |
794 | 819 | | |
795 | 820 | | |
796 | 821 | | |
797 | | - | |
798 | 822 | | |
799 | 823 | | |
800 | 824 | | |
801 | 825 | | |
802 | 826 | | |
803 | 827 | | |
804 | 828 | | |
| 829 | + | |
805 | 830 | | |
806 | 831 | | |
807 | | - | |
| 832 | + | |
| 833 | + | |
808 | 834 | | |
809 | 835 | | |
810 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
801 | 803 | | |
802 | | - | |
803 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
804 | 822 | | |
805 | 823 | | |
806 | | - | |
807 | 824 | | |
808 | 825 | | |
809 | 826 | | |
| |||
0 commit comments