The customer experienced huge load and long execution time using SearchService for content with many states.
For every element, SearchService has to check if a content has the correct state (to be displayed for e.g.). In this particular situation, the customer has at least 19 defined states and tries to perform search for 50 elements. For each of them, SearchService iterates over every state and check it. This operation is very expensive. It will be good to cache getPermissionCriterion() result per user. This way, we will avoid repeating this expensive permission checking in every iteration.