> I am running the same code on both boxes, even the same JAR file. I am > not sure why crypto is involved as I was only retrieving content over > HTTP. I used the HttpClient to download a zip file off a Web server in > the LAN. It should take no time to download it.
Ben, the performance problem seems to have nothing to do with the network I/O. It looks like your application spends more time computing SHA hashes than actually marshalling the data across the wire. You are not using SSL or NTLM authentication by any chance? Oleg -----Original Message----- From: Ben Wong [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 11:10 To: 'Commons HttpClient Project' Subject: RE: GetMethod Performance I am running the same code on both boxes, even the same JAR file. I am not sure why crypto is involved as I was only retrieving content over HTTP. I used the HttpClient to download a zip file off a Web server in the LAN. It should take no time to download it. With the wire log, I have actually removed the log4j.properties file completely from the class path, so it shouldn't be affecting the performance should it? Thanks, Ben -----Original Message----- From: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 February 2004 8:12 PM To: Commons HttpClient Project Subject: RE: GetMethod Performance Ben, The profiles obviously differ quite a bit. For instance the methods below that consume a significant portion of the execution time on Solaris platform take virtually no time on WinXP. Are they executed at all? Are you sure you execute exactly the same code on both platforms? Anyhow, as Roland said, the problem is clearly related to crypto algorithms on the Solaris platform. = Solaris ================================================ Interpreted + native Method 5.6% 18 + 6 java.math.BigInteger.mulAdd 3.3% 14 + 0 sun.security.provider.SHA.computeBlock 3.0% 13 + 0 java.math.BigInteger.addOne 2.8% 11 + 1 sun.nio.cs.StreamDecoder.read =========================================================== One additional note: please make sure that you have debug/wire log turned off when conducting performance measurement, otherwise you simply end up measuring the speed of console output Oleg -----Original Message----- From: Ben Wong [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 23:40 To: 'Commons HttpClient Project' Subject: RE: GetMethod Performance Windows Profile attached. Any help would be appreciated Windows XP on P-M 1.4 --------------------- Flat profile of 3.44 secs (322 total ticks): main Interpreted + native Method 7.5% 0 + 24 java.net.SocketInputStream.socketRead0 7.2% 0 + 23 java.net.PlainSocketImpl.socketConnect 1.3% 0 + 4 java.net.Inet4AddressImpl.lookupAllHostAddr 0.6% 0 + 2 java.io.WinNTFileSystem.getBooleanAttributes 0.6% 0 + 2 java.lang.System.arraycopy 0.6% 1 + 1 java.net.URL.<init> 0.3% 0 + 1 java.lang.reflect.Field.copy 0.3% 0 + 1 java.util.HashMap.hash 0.3% 0 + 1 org.apache.commons.logging.impl.LogFactoryImpl.newInstance 0.3% 0 + 1 sun.misc.URLClassPath$5.<init> 0.3% 1 + 0 org.apache.log4j.Priority.isGreaterOrEqual 0.3% 0 + 1 java.lang.String.<init> 0.3% 1 + 0 java.nio.charset.CharsetDecoder.<init> 0.3% 0 + 1 sun.nio.cs.UTF_8.newDecoder 0.3% 0 + 1 java.lang.String.substring 0.3% 1 + 0 java.nio.charset.CharsetDecoder.<init> 0.3% 1 + 0 java.util.HashMap.transfer 0.3% 0 + 1 sun.text.ComposedCharIter.decomposition 0.3% 0 + 1 sun.security.x509.AlgorithmId.derEncode 0.3% 0 + 1 java.security.SecureClassLoader.getPermissions 0.3% 0 + 1 java.lang.ClassLoader.defineClass0 0.3% 1 + 0 java.lang.String.<init> 0.3% 0 + 1 java.net.PlainSocketImpl.socketBind 0.3% 0 + 1 java.lang.StringCoding$CharsetSE.encode 0.3% 1 + 0 java.lang.String.regionMatches 28.8% 10 + 82 Total interpreted (including elided) Compiled + native Method 15.6% 9 + 41 java.lang.String.getChars 7.5% 24 + 0 sun.nio.cs.US_ASCII$Decoder.decodeArrayLoop 6.6% 12 + 9 java.lang.String.<init> 3.8% 12 + 0 java.nio.charset.CharsetDecoder.decode 3.4% 11 + 0 java.lang.Integer.toUnsignedString 2.8% 9 + 0 sun.nio.cs.StreamDecoder.read0 2.8% 9 + 0 java.nio.Buffer.position 2.8% 7 + 2 java.lang.StringBuffer.append 2.8% 9 + 0 java.util.HashMap.get 2.5% 8 + 0 java.nio.CharBuffer.wrap 1.9% 6 + 0 java.nio.Buffer.<init> 1.6% 0 + 5 java.lang.StringBuffer.insert 1.6% 5 + 0 sun.nio.cs.StreamDecoder$CharsetSD.implRead 1.3% 4 + 0 org.apache.commons.httpclient.Wire.wire 1.3% 1 + 3 java.lang.StringBuffer.expandCapacity 0.9% 3 + 0 sun.nio.cs.US_ASCII$Decoder.decodeLoop 0.9% 3 + 0 java.nio.charset.CoderResult$Cache.get 0.9% 3 + 0 java.nio.CharBuffer.put 0.9% 3 + 0 java.nio.Buffer.limit 0.9% 3 + 0 java.lang.StringBuffer.append 0.6% 2 + 0 java.util.HashMap.hash 0.6% 2 + 0 java.io.InputStreamReader.read 0.6% 2 + 0 java.lang.Integer.equals 0.3% 0 + 1 org.apache.log4j.Category.log 0.3% 1 + 0 java.nio.CharBuffer.arrayOffset 66.6% 152 + 61 Total compiled (including elided) Thread-local ticks: 0.6% 2 Blocked (of total) 0.6% 2 Class loader 1.3% 4 Interpreter 2.8% 9 Compilation Flat profile of 0.01 secs (1 total ticks): DestroyJavaVM Thread-local ticks: 100.0% 1 Blocked (of total) Global summary of 3.45 seconds: 100.0% 345 Received ticks 5.8% 20 Received GC ticks 4.1% 14 Compilation 0.3% 1 Other VM operations 0.6% 2 Class loader 1.2% 4 Interpreter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]