contentful.py icon indicating copy to clipboard operation
contentful.py copied to clipboard

Using the Contentful Python client adds significant latency

Open kyle-kc opened this issue 7 months ago • 1 comments

We are using the delivery client and querying for entries using the entries() method. We are seeing significant latency from this method call that far exceeds the time for the HTTP request to return from Contentful's servers. In general, the HTTP request is taking around ~200 ms while the total time for entries() to return is between 3 and 4 seconds. This is making the client unusable for our production applications.

We further verified this by making the same exact call twice: once with raw_mode set to False and once with raw_mode set to True. When raw_mode is set to False, the method takes almost 10 times as long as when raw_mode is set to True.

If it's helpful, our space ID is skxj1h7bf8uk and the entry we are querying is 77EtShHXyEPlXpTJFr9teZ. We are using many linked entries and cross-space references. It seems to be easy to reproduce with any entry that links to many (20+) other entries.

kyle-kc avatar Jul 23 '24 20:07 kyle-kc