Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 982353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:40:59+00:00 2026-05-16T04:40:59+00:00

There’s a common pattern, when each layer of application, dealing with data from a

  • 0

There’s a common pattern, when each layer of application, dealing with data from a stream tends to wrap it into a BufferedInputStream, so that at a whole, there’s a lot of buffers, filled from buffers, filled from buffers and so on.

I think this is bad practice and want to question: how does it impact the performance? Can this cause bugs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:41:00+00:00Added an answer on May 16, 2026 at 4:41 am

    This is a very general question, but I’d say there are a number of problems with having lots of layers of buffered input streams (in any language).

    • Each buffer takes up memory, even when it’s not filled. So, even if the data gets sucked right up to the top “layer” straight away, memory is still being needlessly used. (Note: I’m assuming that Java doesn’t resize its buffers automatically or anything — and I’m no Java expert.)
    • Whenever you read from the top-level buffer, you’ll be setting off a big chain of method calls. Method calls involve indirection (i.e. pointer-following), passing-around of data (which could lead to poor caching performance), and so on.
    • It probably means that the design isn’t very well-thought-out, since buffered streams should generally be for reading from sources that actually need buffering, like the disk or the network.

    Just a few thoughts on the matter. I’m sure someone with better Java knowledge could contribute a more detailed analysis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There is a directed graph having a single designated node called root from which
There are two intents on the receiver side which are called from the same
There are many string matching algorithms can be used to find a pattern (string)
There is an application written in PHP which I am converting to Ruby. When
There are many tutorials that talk about deleting index.php from the url. But I
I am currently running into a problem where an element is coming back from
There are a few ways to get class-like behavior in javascript, the most common
There is a similar question from 2009 which mentions Wufoo and FormAssembly services. Are
There is a tree style structure from which I want to keep only a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.