-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add speedup module for CPython #297
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
Comments
I have script periodically pump excel data into mariadb using pymysql. |
What is the status of this speedup module? |
I was able to speed up reading/parsing packets by roughly 28% just by reducing the number of function calls. Reading ~70k rows (x45 cols) dropped from 8s to 5.7s on my machine. This quick edit however duplicates some code. See my attempt here: https://github.com/horacekmi/PyMySQL/commit/14125ef1026553c88e28ef3d7bdb849676edd102 |
micro-optimisations, that converts source from hierarchical to linear really can burst performance near 20% in some cases, but it bad way. much better to rewrite thats parts of code to cython... |
I'm willing to make an initial attempt at isolating and simplifying the parsing code (issue 2 from above). |
i was using aiomysql, and found a point to speed up when i was executing a insert ignore, or something that could report a known warning, it was executing a show warnings (2 queries) force removing the show warnings changed my app to run from ~7kqps to ~10kqps (multi process) i didn't checked pymysql code, but this could be a nice parameter at cursor.execute() function |
and maybe we could use numba+cython, when possible? |
I opened another similar issue (#1066) not realizing this one was here. I have a fork of PyMySQL with a C extension that replaces the row data reader method and adds some tuned cursors that gives significant speed improvements. The issue was opened to start a conversation about a possible plugin for PyMySQL, and to collaborate on further improvements. |
There are two bottlenecks.
1 is resolved by using io module.
To resolve issue 2, we should remove classes for parsing packets, and use simple flat function and
builtin types. It make PyMySQL on PyPy faster.
Then, we can easily replace them with speedup module written in C.
The text was updated successfully, but these errors were encountered: