Commit 5efd4be
sqlite: cache column names in stmt.all()
While the statement is running, it is impossible to modify the column
names and thus it is beneficial to create the host-language (JS) keys
once per all rows and reuse them for all results.
With this change the performance of `.all()` improves by around 25%
depending on the number of columns and rows in the result.
PR-URL: nodejs#55373
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent 88efd47 commit 5efd4be
1 file changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
| 746 | + | |
746 | 747 | | |
747 | | - | |
748 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
749 | 758 | | |
750 | 759 | | |
751 | 760 | | |
752 | | - | |
753 | | - | |
754 | | - | |
| 761 | + | |
755 | 762 | | |
756 | 763 | | |
757 | | - | |
758 | 764 | | |
759 | 765 | | |
760 | 766 | | |
761 | | - | |
762 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
763 | 772 | | |
764 | 773 | | |
765 | 774 | | |
| |||
0 commit comments