[
https://issues.apache.org/jira/browse/SSHD-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466092#comment-16466092
]
Goldstein Lyor commented on SSHD-823:
-------------------------------------
{quote}Would it not be better to dynamicly calculate the maximum SSH_FXP_NAME
packet size based on MAX_PACKET_SIZE?{quote}
Actually, it is not "better" - most directories do not contain large number of
files, so it would be extremely wasteful to allocate a very large buffer and
then populate it sparsely. Even 16KB seems a bit large to me and I was
considering lowering it to ~4KB. That being said, since large directories are
not very common, you can do as you suggested:
{quote}
It is possible to override this constant by setting the property
MAX_READDIR_DATA_SIZE_PROP for that session.
{quote}
If only there was a way to *count* the number of entries without enumerating
them...
> Retrieving a directy listing of a directory containing a large number of
> files is very slow.
> --------------------------------------------------------------------------------------------
>
> Key: SSHD-823
> URL: https://issues.apache.org/jira/browse/SSHD-823
> Project: MINA SSHD
> Issue Type: Improvement
> Affects Versions: 1.6.0, 1.7.0
> Reporter: Mark Ebbers
> Priority: Minor
> Labels: directory-listing, perfomance, ssh_fxp_name
>
> Retrieving a directy listing of a directory containing a large number of
> files is very slow.
> The method SftpSubSystem.doReaddir() uses a fixed maximum packet size of the
> returned SSH_FXP_NAME packets of 16*1024 bytes. Defined by the constant
> DEFAULT_MAX_READDIR_DATA_SIZE. It is possible to override this constant by
> setting the property MAX_READDIR_DATA_SIZE_PROP for that session.
> Would it not be better to dynamicly calculate the maximum SSH_FXP_NAME packet
> size based on MAX_PACKET_SIZE?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)