Performance problems with 100k+ entries
esped-dfds opened this issue · comments
We are trying to build our website with gatsby using gatsby-source-contentful. I've identified a performance problem in the way links are looked up. By using an array as datastructure and doing liniar search, it takes 20-30 mins extra to resolve links.
contentful-resolve-response/index.js
Line 40 in eb83b02
In my POC I put all the entries in an object with id as key which allowed it to resolve the links immediately.
Looking at the code today it seems like it can support entries and assets with the same id. I don't know if this is a use case that needs to be supported.