The Artima Developer Community
Sponsored Link

Java Buzz Forum
Efficient Socket Reading in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sam Dalton

Posts: 143
Nickname: samd
Registered: Jun, 2003

Sam Dalton is a Java Developer with ThoughtWorks in teh UK
Efficient Socket Reading in Java Posted: Oct 14, 2003 2:11 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Sam Dalton.
Original Post: Efficient Socket Reading in Java
Feed Title: import java.*;
Feed URL: http://www.samjdalton.com/pebble/rss.xml
Feed Description: Random, Infrequent Bloggings of a Techie
Latest Java Buzz Posts
Latest Java Buzz Posts by Sam Dalton
Latest Posts From import java.*;

Advertisement

In debugging a slight performance problem in an application today, I discovered something interesting.

Basically, using BufferedReader to read some XML from a raw socket is several orders of magnitude faster than using BufferedInputStream.

Now I have always known that BufferedReader is preferable as it provides locale sensitive character data, but I had not realised that there was such a performance difference in using it, if anything I would have expected it to be less efficient as it is dealing with locale information.

Time to start looking for other areas in our aplpications still using Input and Output Streams!

Read: Efficient Socket Reading in Java

Topic: Packaging Velocity Previous Topic   Next Topic Topic: J2ME XML Parsers

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use