Commit b4853e5
authored
perf: improve row merging (#619)
The underlying GAPIC client uses protoplus for all requests and responses. However the underlying protos for ReadRowsResponse are never exposed to end users directly: the underlying chunks get merged into logic rows. The readability benefits provided by protoplus for ReadRows do not justify the costs. This change unwraps the protoplus messages and uses the raw protobuff message as input for row merging. This improves row merging performance by 10x. For 10k rows, each with 100 cells where each cell is 100 bytes and in groups of 100 rows per ReadRowsResponse, cProfile showed a 10x improvement:
old: 124266037 function calls in 68.208 seconds
new: 13042837 function calls in 7.787 seconds
There are still a few more low hanging fruits to optimize performance and those will come in follow up PRs1 parent 7bad13a commit b4853e5
File tree
3 files changed
+31
-18
lines changed- google/cloud/bigtable
- tests/unit
3 files changed
+31
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
| |||
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
546 | | - | |
547 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
548 | 553 | | |
549 | | - | |
550 | | - | |
| 554 | + | |
| 555 | + | |
551 | 556 | | |
552 | 557 | | |
553 | 558 | | |
| |||
577 | 582 | | |
578 | 583 | | |
579 | 584 | | |
580 | | - | |
581 | | - | |
| 585 | + | |
| 586 | + | |
582 | 587 | | |
583 | 588 | | |
584 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | | - | |
| 648 | + | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
682 | 683 | | |
683 | 684 | | |
684 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
685 | 689 | | |
686 | 690 | | |
687 | 691 | | |
| |||
1455 | 1459 | | |
1456 | 1460 | | |
1457 | 1461 | | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1462 | 1468 | | |
1463 | 1469 | | |
1464 | 1470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
2213 | 2215 | | |
2214 | 2216 | | |
2215 | 2217 | | |
| |||
0 commit comments