Closed
Description
We're having issues with extremely slow queries while using the object mapper. The raw query itself isn't slow, but instancing the objects in Python seems to be.
While profiling, we noticed that there seems to be a bottleneck on the following line, using deepcopy
:
python-driver/cassandra/cqlengine/columns.py
Line 1041 in 94b64bb
We're not entirely sure what that deepcopy is for, so we tried removing it locally, and it seemed to result in a huge speed boost.
I believe simply removing it might break something, so I won't suggest doing that straight away, but I believe there might be a better approach to this that could avoid deepcopy when not necessary.