clickhouse-driver
                                
                                 clickhouse-driver copied to clipboard
                                
                                    clickhouse-driver copied to clipboard
                            
                            
                            
                        clickhouse_driver.varint.read_varint is called recursively
Describe the bug Observed a case where when the query string is long, Package is taking more time to render data. Also ran a profiler and checked that database is returning result instantly (less than 500ms) but package is taking more 30-35 seconds.
To Reproduce Trigger API with higher query string (approx more than 575316)
Expected behavior Package should return response within 1 second
Versions
- Version of package with the problem.
- ClickHouse server version. Version can be obtained by running SELECT version()query. 23.12.1.956
- Python version. 3.11
Please refer to https://github.com/jayvynl/django-clickhouse-backend/issues/70 as well
@jayvynl
Hi.
Do you have any advices to achieve this speed? I've spent many hours on this thing and ended with pushing this code to cython. There are many places in binary protocol with numbers in LEB128. IMHO, this function is simple as it can be. The main time takes read_one function that reads one by one bytes from input stream.
As of now, we don't have any solution. I am exploring stuff @xzkostyan