[ 
https://issues.apache.org/jira/browse/JAMES-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16555393#comment-16555393
 ] 

ASF GitHub Bot commented on JAMES-2498:
---------------------------------------

Github user mbaechler commented on a diff in the pull request:

    https://github.com/apache/james-project/pull/132#discussion_r205031053
  
    --- Diff: 
server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/JDBCMailRepository.java
 ---
    @@ -721,6 +721,27 @@ protected void internalRemove(MailKey key) throws 
MessagingException {
             }
         }
     
    +    @Override
    +    public long size() throws MessagingException {
    +        Connection conn = null;
    --- End diff --
    
    In these cases, we often do a first commit to migrate code to the right 
code-style, then a second one with the change we want.


> JDBCMailRepository should not materialize entities for counting them.
> ---------------------------------------------------------------------
>
>                 Key: JAMES-2498
>                 URL: https://issues.apache.org/jira/browse/JAMES-2498
>             Project: James Server
>          Issue Type: Improvement
>          Components: JDBC, MailStore & MailRepository
>    Affects Versions: master, 3.2.0
>            Reporter: Edgar Asatryan
>            Priority: Major
>              Labels: performance
>
> *JDBCMailRepository* can significantly save time and memory when 
> *JDBCMailRepository#size()* is invoked by executing SQL query.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to