sqlite: cache column names in stmt.all() · nodejs/node@c3c4030 · GitHub
Skip to content

Commit c3c4030

Browse files
indutnyruyadorno
authored andcommitted
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: #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 66e41f0 commit c3c4030

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

src/node_sqlite.cc

Lines changed: 17 additions & 8 deletions

0 commit comments

Comments
 (0)