On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>URL: http://svn.apache.org/viewvc?view=rev&rev=554675
>Log:
>IMPROVEMENT: File buffer increased to 64KB (IVY-551)
>
>incubator/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh
/Scp.java (original)
>@@ -285,7 +285,7 @@
>
> private void sendFile(Channel channel, String localFile, String
remoteName, String mode)
> throws IOException, RemoteScpException {
>- byte[] buffer = new byte[8192];
>+ byte[] buffer = new byte[64 * 1024];
>
>@@ -367,7 +367,7 @@
> */
> private FileInfo receiveStream(Channel channel, String file,
OutputStream targetStream)
> throws IOException, RemoteScpException {
>- byte[] buffer = new byte[8192];
>+ byte[] buffer = new byte[64 * 1024];
Why not use a constant like in SshRepository (BUFFER_SIZE)?
Indeed, no reason.
I am not sure if it makes sence to factor constants out into a "constant
class"
(like Ant's MagicNumbers) or into FileUtil.
Why not. What do others think?
incubator/ivy/core/trunk/src/java/org/apache/ivy/util/url/BasicURLHandl
er.java (original)
>@@ -36,7 +36,7 @@
> */
> public class BasicURLHandler extends AbstractURLHandler {
>
>- private static final int BUFFER_SIZE = 4096;
>+ private static final int BUFFER_SIZE = 64 * 1024;
same - no constant used.
What do you mean by no constant used? It's only no central constant, but we
are defining a constant here.
Xavier
Jan
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/