AshharAhmadKhan opened a new pull request, #5747:
URL: https://github.com/apache/fineract/pull/5747

   ## Description
   
   JIRA: https://issues.apache.org/jira/browse/FINERACT-2582
   
   Two methods were performing identical repository lookups inside loops 
   where the argument never changes across iterations, causing N redundant 
   DB round-trips per invocation.
   
   - 
`UpdateEmailOutboundWithCampaignMessageTasklet.insertDirectCampaignIntoEmailOutboundTable()`:
 
     `emailCampaignRepository.findById(campaignId)` hoisted above the loop — 
`campaignId` is constant per invocation.
   
   - `NotificationWritePlatformServiceImpl.insertIntoNotificationMapper()`: 
     
`notificationGeneratorReadRepositoryWrapper.findById(generatedNotificationId)` 
hoisted above the loop — `generatedNotificationId` is constant per invocation.
   
   No logic change — both lookups still happen, just once instead of N times.
   
   Same class of redundancy as FINERACT-2561.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to