You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/06/08 11:47:54 UTC

[GitHub] [james-project] chibenwa commented on a change in pull request #474: [PERFORMANCE] Various little fixes

chibenwa commented on a change in pull request #474:
URL: https://github.com/apache/james-project/pull/474#discussion_r647361528



##########
File path: server/blob/blob-cassandra/src/main/java/org/apache/james/blob/cassandra/cache/CachedBlobStore.java
##########
@@ -138,17 +138,19 @@ public InputStream read(BucketName bucketName, BlobId blobId, StoragePolicy stor
         if (storagePolicy == LOW_COST) {
             return backend.read(bucketName, blobId);
         }
-        return Mono.just(bucketName)
-            .filter(getDefaultBucketName()::equals)
-            .flatMap(defaultBucket -> readInDefaultBucket(bucketName, blobId))
-            .switchIfEmpty(readFromBackend(bucketName, blobId))
+        if (bucketName.equals(getDefaultBucketName())) {

Review comment:
       Well as a rule of thumb simplifying the reactor execution lead to less big call stacks, and less runtime steps.
   
   IMO we should refrain from pushing unneeded complexity to reactor.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org