Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg module #1

Open
RekGRpth opened this issue Sep 16, 2020 · 3 comments
Open

pg module #1

RekGRpth opened this issue Sep 16, 2020 · 3 comments

Comments

@RekGRpth
Copy link

Why not use pg module in TFB?

@billywhizz
Copy link
Contributor

Hi and welcome. I did indeed implement a wrapper around libpg here: https://github.com/just-js/modules/tree/master/pg but i could not get perf with it to be as good as i thought it should be. believe it or not the js version runs faster, especially for the multi query and multi update benchmarks. i think this is something to do with blocking reads or writes in libpg but i need to revisit it.

This should also come with a big caveat that it is alpha level code and likely has lots of bugs and cases it is not handling correctly. The goal for the moment for me is to establish a performance baseline and add features and functionality from there.

I am hoping to write up a a few articles on this over coming weeks. You can keep an eye on the main repo here: https://github.com/just-js and my currently empty blog here: https://billywhizz.io/.

@RekGRpth
Copy link
Author

RekGRpth commented Sep 19, 2020

js version runs faster

Yes, I think so too!
There are 2 async libraries in python for postgres: one's libpq-wrapper and another uses raw connection, and second library works much faster!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants