Description
The way we process the entries to keep only the requested attributes in the filterContents() method is suboptimal. The code does something like :
for each attributeType in the entry do for each requested attribute do blah...
We should use the fact that the requested attributes is a set to check if the entry attributeType is present in this set instead of looping over all of them. We can also decide to do the opposite if the number of requested attribute is far below the entry attributes.
Not that it could save a lot of process time currently, but it represents 3.5% of the overall CPU, a portion that will increase greatly as soon as we get rid of the costly and useless clone and other superfluous operations we do, so I want to keep a track of this inefficiency for a later improvement.