mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-739) A call to resolvePropertyValue can be very inefficient
Date Wed, 12 Apr 2017 17:02:41 GMT

    [ https://issues.apache.org/jira/browse/SSHD-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966214#comment-15966214

Goldstein Lyor commented on SSHD-739:

All the improvements sound reasonable, although I am not sure about initializing {{SyspropsMapWrapper}}
at construction - what if system properties are added/remove programmatically ?

> A call to resolvePropertyValue can be very inefficient
> ------------------------------------------------------
>                 Key: SSHD-739
>                 URL: https://issues.apache.org/jira/browse/SSHD-739
>             Project: MINA SSHD
>          Issue Type: Improvement
>            Reporter: Guillaume Nodet
>            Priority: Minor
> Each time a property is retrieved, all system properties names are iterated.
> This is because {{PropertyResolverUtil#resolvePropertyValue}} is calling {{GenericUtils.isEmpty(props)}}
on a {{SyspropsMapWrapper}}.
> This can be solved by using {{isNull(props)}} instead of {{isEmpty(props)}} as there's
no need to check if the map is empty.
> In the same call, there's also a call to {{System.getProperty}} which seems to be redundant
with the {{SyspropsMapWrapper}}.  I think it should be removed.

This message was sent by Atlassian JIRA

View raw message