Added filtering by master ids in rollUp method to avoid querying for every single record in detail object.