Hi, com.sun.net.httpServer uses a selector to get notified about interesting events (such as arrival of a new connection, or data available to read on an existing connection when using keep-alive), but imposes a timeout of 1000 ms on the select() operation. Although this is not a problem when the server uses a ThreadPool with more than one thread, but for a single threaded server, this timeout gives rise to a bottleneck and should be reduced to a lower value. I have proposed 200 ms for the timeout here, but if anyone has preference for a greater or lower value, I am open to that too. Bug:http://bugs.sun.com/view_bug.do?bug_id=8014254 (To appear) Webrev:http://cr.openjdk.java.net/~khazra/8014254/webrev.00/ Thanks, - Kurchi
Code Review Request: 8014254: Selector in HttpServer introduces a 1000 ms delay when using KeepAlive
- Code Review Request: 8013140: Heap corruption with Net... Kurchi Subhra Hazra
- Re: Code Review Request: 8013140: Heap corruption... Chris Hegarty
- Re: Code Review Request: 8013140: Heap corruption... Alan Bateman
- Re: Code Review Request: 8013140: Heap corrup... Kurchi Hazra
- Code Review Request: 8014254: Selector in HttpSer... Kurchi Hazra
- Re: Code Review Request: 8014254: Selector in... Matthew Hall
- Re: Code Review Request: 8014254: Selecto... Kurchi Hazra
- Re: Code Review Request: 8014254: Sel... Chris Hegarty
- Re: Code Review Request: 8014254... Kurchi Hazra
- Re: Code Review Request: 801... Chris Hegarty
- Re: Code Review Request: 8014254: Selector in... Alan Bateman
- Re: Code Review Request: 8014254: Selecto... Kurchi Subhra Hazra
- Code Review Request: 6328537: Improve javadoc... Kurchi Hazra
- Re: Code Review Request: 6328537: Improve... Alan Bateman
- Re: Code Review Request: 6328537: Improve... Chris Hegarty