-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
First off, huge fan of the project. The paradigm shift of applying utility classes to database queries is exactly what the industry needs.
However, after reviewing the codebase, I noticed the query parser isn't leveraging the safety guarantees provided by the Rust borrow checker. While the current implementation works, we are leaving performance on the table.
The Proposal: I suggest we rewrite the core logic in Rust (using pg-sys bindings and tokio for the runtime).
Why?:
- We can shave off at least 0.4ms during query string concatenation.
- Currently, I’m not 100% sure that the SQL strings aren't leaking memory in the V8 heap. Rust guarantees that our
SELECT *statements are memory safe at compile time. - If we ever need to generate 4 million queries per second on a Raspberry Pi, the current stack might bottleneck. Rust solves this.
I believe this should solve most of the issues open on this repository.
Karljoy973, himanshu662000, Kallepan, jottunn, 1216892614 and 6 more
Metadata
Metadata
Assignees
Labels
No labels