The default ThumbnailFolderishFactory in 7.10 contains code that is not good when it comes to scalability.
The fault code is actually :
It means that when computing the thumbnail of a Folderish document the current code will call getChildren twice:
- this is bad to do the call twice
- call getChildren is costly when the folder is big (there is no batching so it will fetch all children from the DB and load them into memory)
To work around that we should : so a simple NXQL query
- filtering on ecm:parentId
- giving a max entries of 1
- not using any ordering (otherzise the DB still needs to read all the children)
On master, this factory does not seem to exist anymore, but this is worth checking the real current implementation.