quantranhong1999 commented on code in PR #2963:
URL: https://github.com/apache/james-project/pull/2963#discussion_r2893706890


##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailQueryOptimizer.scala:
##########
@@ -51,15 +53,18 @@ class EmailQueryViewOptimizer @Inject() (mailboxManager: 
MailboxManager,
     }
 
   private def matchesInMailboxSortedByReceivedAt(request: EmailQueryRequest): 
Boolean =
-    request.filter.exists(_.inMailboxFilterOnly) &&
+    configuration.isEmailQueryViewEnabled &&

Review Comment:
   Why just not call `configuration.isEmailQueryViewEnabled` once at top of the 
`apply` method. If `false`, we return directly `None`? That could save us a few 
condition check(s).
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to