You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that making a simple entries query using this library is much much slower than using a regular rest gem like Typhoeus. I can make the same call and get back the entries in roughly 1 sec compared to 15 when using this gem. Is anyone else noticing this slowness?
The text was updated successfully, but these errors were encountered:
Looks like you may have your content with many circular references, that's causing the link resolution engine in this gem to have exponential resolution times because by default it tries to solve up to the 20th level - in order to allow to have elements up to the maximum nesting allowed by the API on a request, which is 10, and have that last element properly solve all it's reference tree if it includes an element that's previously present in the chain.
Do not worry, you can just adjust the maximum level by changing the value in the client configuration.
At client instantiation time:
client=Contentful::Client.new(space: 'space_id',access_token: 'your_access_token',dynamic_entries: :auto,raise_errors: true,max_include_resolution_depth: 5# Change this number to what you need. It's usually recommended to set it to `include * 2`, but in the case of circular references, change it to `include + 1`.)
It seems that making a simple entries query using this library is much much slower than using a regular rest gem like Typhoeus. I can make the same call and get back the entries in roughly 1 sec compared to 15 when using this gem. Is anyone else noticing this slowness?
The text was updated successfully, but these errors were encountered: