directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yudhik <...@git.apache.org>
Subject [GitHub] directory-fortress-core pull request #7: Concern about Connection Pooling an...
Date Wed, 07 Feb 2018 22:26:04 GMT
GitHub user yudhik opened a pull request:

    https://github.com/apache/directory-fortress-core/pull/7

    Concern about Connection Pooling and String concatenation

    I think i was missed about the performance mode for RestUtils class. it use only the defau
max connection which only 2 if we did not specified any max connection for connection pooling.
    
    With the changed i made, we able to use http.maxConnections property at runtime to specified
how many maximum connection that we want to have.
    
    Apart from the connection pool, i think we could use StringUtils from apache common lang3
to reduce the memory footprint of string concatenation too.
    
    from some code like this : 
    
    String error = "safeText value [" + value + "] invalid length [" + length + "]";
    
    into something like this : 
    
    StringUtils.join(new String[] {"safeText value [", value, "] invalid length [", String.valueOf(length),
"]"}, null)
    
    Please advise, if you agree then i will refactor the existing String concatenation at
this project (Since i only change the pooling when submit this request) within the same pull
request.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yudhik/directory-fortress-core master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/directory-fortress-core/pull/7.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #7
    
----
commit e960401cc05053c606950709b5965ebb4d2efe1d
Author: yudhi karunia surtan <brainmaster716@...>
Date:   2018-02-07T21:22:30Z

    add using system properties to increase the connection pooling facility

----


---

Mime
View raw message