hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject [RELEASE STOPPER] 2.0rc1 is no-go due to a serious performance issue
Date Sun, 27 Jul 2003 12:24:27 GMT
Folks,
Sadly enough, I have to confirm the performance problem reported by Todd
Wolff <twolff@austin.rr.com>. HttpClient's performance as of 2.0 beta-1
degraded almost four-fold compared to 2.0 alpha-3. The problem is fairly
easy to reproduce:

import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;

public class Test {

    public static void main(String args[]) throws Exception {

        HttpClient httpclient = new HttpClient();
        long s = 0;
        for (int i = 0; i < 200; i ++) {
            GetMethod httpget = new GetMethod(
              "http://localhost:8080/httpclienttest/body");
            long start = System.currentTimeMillis();
            httpclient.executeMethod(httpget);
            long end = System.currentTimeMillis();
            long duration = end - start;
            System.out.println("Execution time in ms: " + duration);
            s += duration;
        }
        System.out.println("Average: " + (s / 200));
    }
  
On my system I get average response time of 5ms with 2.0a3 compared to
23ms with 2.0rc1. I have no idea what kind of lunacy we have pulled off
to make that happen. I checked the most obvious suspects:
HttpConnection, wire logs. No solution yet.

Oleg


Mime
View raw message