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/05/16 10:52:58 UTC

[GitHub] [james-project] chibenwa opened a new pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

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


   ![Screenshot from 2021-05-16 17-45-01](https://user-images.githubusercontent.com/6928740/118394413-cb653f00-b66e-11eb-9ee2-161407da0c6c.png)
   
   Here we can see a call to `MessageResultImpl::getMessageId` responsible of `0.78%` of the total allocated memory... Rationals are that and intermediate (uneeded) on the fly messageMetadata is used, which includes an (innefficient) flag copy.
   
   ![Screenshot from 2021-05-16 17-51-05](https://user-images.githubusercontent.com/6928740/118394515-59412a00-b66f-11eb-86ae-6a40b240ebbc.png)
   
   Here is a flame graph capture showing the costs of initializing JMAP routes for each requests.


-- 
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] rouazana commented on a change in pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

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



##########
File path: mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/FlagsFactory.java
##########
@@ -60,10 +60,7 @@ private static Flags asFlags(MailboxMessage mailboxMessage, String[] userFlags)
     }
 
     public static Flags createFlags(MailboxMessage mailboxMessage, String[] userFlags) {
-        return builder()
-            .flags(asFlags(mailboxMessage, userFlags))
-            .addUserFlags(userFlags)
-            .build();
+        return asFlags(mailboxMessage, userFlags);

Review comment:
       why not removing createFlags and replace it by asFlags then?




-- 
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 pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-841909315


   ![Screenshot from 2021-05-17 07-46-15](https://user-images.githubusercontent.com/6928740/118418783-12414c00-b6e4-11eb-9a61-5f8398c81f3f.png)
   
   0.56% running an inefficient algorithm to state which mailboxes have kids, in O(n2). While the percentage is low acting on it with likely improve p99 for `Mailbox/get` with many mailboxes and is thus worth writing.


-- 
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] rouazana commented on a change in pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

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



##########
File path: mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/FlagsFactory.java
##########
@@ -60,10 +60,7 @@ private static Flags asFlags(MailboxMessage mailboxMessage, String[] userFlags)
     }
 
     public static Flags createFlags(MailboxMessage mailboxMessage, String[] userFlags) {
-        return builder()
-            .flags(asFlags(mailboxMessage, userFlags))
-            .addUserFlags(userFlags)
-            .build();
+        return asFlags(mailboxMessage, userFlags);

Review comment:
       why not removing createFlags and replace it by asFlags then?




-- 
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 edited a comment on pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa edited a comment on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-842243490


   I confirm the last fixups regarding "computing metadata" do not cost performance.
   
   ![Screenshot from 2021-05-17 18-20-38](https://user-images.githubusercontent.com/6928740/118480715-d090bf80-b73c-11eb-95f7-4e4a793f7205.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] chibenwa commented on pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-842243490


   I confirm the last fixups regarding "computing metadata" do not cost performance.


-- 
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 pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-841834668


   ![Screenshot from 2021-05-16 22-41-50](https://user-images.githubusercontent.com/6928740/118403293-06c83380-b698-11eb-8fe9-fbdd063f0913.png)
   
   0.26% CPU resources on formatting a validation message...


-- 
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 pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-841834668






-- 
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 edited a comment on pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

Posted by GitBox <gi...@apache.org>.
chibenwa edited a comment on pull request #435:
URL: https://github.com/apache/james-project/pull/435#issuecomment-842243490


   I confirm the last fixups regarding "computing metadata" do not cost performance.
   
   ![Screenshot from 2021-05-17 18-20-38](https://user-images.githubusercontent.com/6928740/118480715-d090bf80-b73c-11eb-95f7-4e4a793f7205.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] chibenwa merged pull request #435: [PERFORMANCE] Various small enhancements detected thanks to flame graphs

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


   


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