-
Notifications
You must be signed in to change notification settings - Fork 23
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
✨ Add Async SQLAlchemy #11
base: master
Are you sure you want to change the base?
Conversation
Thanks! Every PR is great |
I'll continue tomorrow then. Thanks. :) |
@long2ice I've tested only with SQLite. The results were far too positive, so I'm not sure if I've made some mistakes around. Maybe adding a virtual machine with limited resources will be more fair. What do you think? Do you mind giving a quick look? Thank you in advance! 😗 |
I have no more questions, thanks your contribution, if your finish this I will merge that. |
Remove list() from all(), as they already do that.
Is this PR still missing something as it hasn't been merged yet? |
Oh I miss that, is this PR ready? @Kludex |
Not that I'm aware. @long2ice is there something missing here? |
No, I mean if you finished this PR, I can merge it right now |
Let me check once again today. As far as I remember it was completed. I'll confirm in some hours. |
I made test on my PC, async SqlAlchemyCore is slower than sync SqlAlchemyCore, and of course slower than Tortoise ORM. Here is specification.
=============== ==================== ========== ========== ============== ========== ========== =============== ==================== ========== ========== ============== ========== ========== =============== ==================== ========== ========== ============== ========== ==========
=============== ========== ========== ============== ============ ========== =============== ========== ========== ============== ============ ========== =============== ========== ========== ============== ============ ==========
=============== ========== ========== ============== ============ ========== =============== ========== ============== ========== |
So this branch works just fine, right? 😗 |
For PostgreSql there are many failed benchmark tests. |
Ah, I didn't notice you said that Async SQLAlchemy Core is slower. That doesn't make sense. 😗 I'm going to see if I can get this at some point this week, I'm not having much time. |
Hi! Maybe you can ask for some help from Mike Bayer - the author of SQLAlchemy. He has just made a pull request for the new ORM benchmark project called IMDBbench by EdgeDB. |
I said that it doesn't make sense because I remember my previous results giving a better performance as the one I'm providing here. In any case, if @zzzeek wants to help, he is more than welcome... I still didn't have the time to check this PR. |
i would suggest doing some SQL echoing to see if the number of SQL calls is different. if you are comparing psycopg2 to asyncpg, SQLAlchemy has optimizations to INSERTs in place for psycopg2 only at the moment. |
@long2ice Would you accept a PR for the SQLAlchemy 1.4 async?
This PR is not fully implemented (I got tired). But I'll continue later if you consider accepting it.