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/02 05:00:03 UTC

[GitHub] [james-project] chibenwa opened a new pull request #471: [PERFORMANCE] Migrate where possible from Mono.fatMap to flatMapIterable

chibenwa opened a new pull request #471:
URL: https://github.com/apache/james-project/pull/471


   Before : 
   
   ![Screenshot from 2021-06-02 11-58-18](https://user-images.githubusercontent.com/6928740/120426223-df60ae80-c399-11eb-86ea-11df3838bbea.png)
   
   After:
   
   ![Screenshot from 2021-06-02 11-58-51](https://user-images.githubusercontent.com/6928740/120426279-fd2e1380-c399-11eb-9d0a-e9ab38652576.png)
   
   


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


[GitHub] [james-project] Arsnael commented on a change in pull request #471: [PERFORMANCE] Migrate where possible from Mono.fatMap to flatMapIterable

Posted by GitBox <gi...@apache.org>.
Arsnael commented on a change in pull request #471:
URL: https://github.com/apache/james-project/pull/471#discussion_r643719678



##########
File path: backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/utils/CassandraAsyncExecutor.java
##########
@@ -67,7 +68,7 @@ public CassandraAsyncExecutor(Session session) {
 
     public Flux<Row> executeRows(Statement statement) {
         return execute(statement)
-            .flatMapMany(Flux::fromIterable);
+            .flatMapIterable(Function.identity());

Review comment:
       Can you explain what `Function.identity()` is for exactly?




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


[GitHub] [james-project] chibenwa merged pull request #471: [PERFORMANCE] Migrate where possible from Mono.fatMap to flatMapIterable

Posted by GitBox <gi...@apache.org>.
chibenwa merged pull request #471:
URL: https://github.com/apache/james-project/pull/471


   


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


[GitHub] [james-project] chibenwa commented on a change in pull request #471: [PERFORMANCE] Migrate where possible from Mono.fatMap to flatMapIterable

Posted by GitBox <gi...@apache.org>.
chibenwa commented on a change in pull request #471:
URL: https://github.com/apache/james-project/pull/471#discussion_r643732957



##########
File path: backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/utils/CassandraAsyncExecutor.java
##########
@@ -67,7 +68,7 @@ public CassandraAsyncExecutor(Session session) {
 
     public Flux<Row> executeRows(Statement statement) {
         return execute(statement)
-            .flatMapMany(Flux::fromIterable);
+            .flatMapIterable(Function.identity());

Review comment:
       We have a `Mono<ResultSet>` and `ResultSet` is an interable, so we do not need to transform it.




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