Committable suggestion
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
List words = wordDao.readAll();
logger.info("words.size(): " + words.size());
for (Word word : words) {
logger.debug("word.getText(): " + word.getText());
for (LetterSound letterSound : word.getLetterSounds()) {
letterSoundFrequencyMap.put(letterSound.getId(),
letterSoundFrequencyMap.getOrDefault(letterSound.getId(), 0) + word.getUsageCount());
}
}
`````
Logging within loops can be expensive. Consider reducing the log level or aggregating logs.
Committable suggestion
> :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion List_Originally posted by @coderabbitai[bot] in https://github.com/elimu-ai/webapp/pull/1725#discussion_r1676883575_
The webapp in production is configured to only output logs with threshold level
INFO
or higher: https://github.com/elimu-ai/webapp/blob/main/src/main/resources/log4j2_PROD.xml#L3