PynamoDB icon indicating copy to clipboard operation
PynamoDB copied to clipboard

Significant Performance Degradation in Version 6.0.1 Compared to 5.5.1

Open jbsilva opened this issue 6 months ago • 0 comments

We recently upgraded PynamoDB from version 5.5.1 to 6.0.1 and observed a significant performance degradation during our internal benchmarks.

The benchmarks consisted of a series of query and scan operations on real DynamoDB tables, which closely reflect our production usage. The performance hit was consistent across multiple runs, with some operations taking nearly twice as long in version 6.0.1.

Here are the benchmark results:

PynamoDB 5.5.1: 8.09s, 4.11s, 3.63s, 3.96s
PynamoDB 6.0.1: 11.91s, 8.58s, 7.54s, 7.95s

The only difference between these runs was the PynamoDB version and its dependencies. We noticed that in #1079, you anticipated a performance hit of around 25%. However, in our case, the impact is significantly higher.

For now, we have downgraded to version 5.5.1 to avoid the performance issues. However, this is not a viable long-term solution, as this version is no longer receiving bug fixes or being tested against new versions of botocore.

Environment:

Python version: 3.12
Dependency management: Poetry

Please let us know if there is any additional information we can provide to help diagnose this issue or any workarounds.

jbsilva avatar Aug 23 '24 08:08 jbsilva