Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Advocacy > Re: What happen...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 10 Topic 2408 of 2475
Post > Topic >>

Re: What happened to Double Buffering?

by Daniel Pitts <newsgroup.spamfilter@[EMAIL PROTECTED] > Jun 22, 2008 at 09:50 PM

Roedy Green wrote:
> I put in  primitive sort of progress meter into a little Java program
> that read a large CSV file [System.out.print(".")]  I was quite
> surprised to discover I could easily see the pause when it read the
> next buffer full -- synched with the disk light. (Maybe I err. Maybe I
> was seeing GCs).
> 
> Way way back in the olden days when computers had about 16K and you
> coded in assembler, we did double buffering.  In other words, when you
> were reading a sequential file, you processed one buffer while the i/o
> hardware was filling the other.  This was the NORMAL way of doing
> things.  Later, double buffering was built in to COBOL. You got it by
> default without writing any code.
> 
> Today, when we have RAM coming out our ears we have reverted back to
> SINGLE buffering.  We alternate between processing and waiting for I/O
> on the same buffer.
> 
> What is the matter with us? It is as though we imagine we still have a
> single threaded DOS OS.
> 
Double Buffering generally refers to rendering, not look-ahead caching, 
which is what you seem to be describing.

As for caching/buffering that you suggest, it is usually handled at the 
OS level, rather than at the app level.  You can add additional 
buffering by using BufferedInputStream.  Also, depending on your 
application, if you really need that big of a speed increase, decide to 
read the whole thing into memory up front.

Alternately, if you want to read ahead, you can create your own 
multi-threaded system to do so.

-- 
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
 




 10 Posts in Topic:
What happened to Double Buffering?
Roedy Green <see_websi  2008-06-23 01:54:08 
Re: What happened to Double Buffering?
Daniel Pitts <newsgrou  2008-06-22 21:50:13 
Re: What happened to Double Buffering?
Roedy Green <see_websi  2008-06-24 09:15:06 
Re: What happened to Double Buffering?
Roedy Green <see_websi  2008-06-24 09:53:25 
Re: What happened to Double Buffering?
The Ghost In The Machine   2008-06-24 11:30:45 
Re: What happened to Double Buffering?
Lew <lew@[EMAIL PROTEC  2008-06-26 08:07:21 
Re: What happened to Double Buffering?
Roedy Green <see_websi  2008-07-01 02:39:05 
Re: What happened to Double Buffering?
The Ghost In The Machine   2008-07-01 14:00:00 
Re: What happened to Double Buffering?
Daniel Pitts <newsgrou  2008-06-24 13:04:34 
Re: What happened to Double Buffering?
Tim Smith <reply_in_gr  2008-06-26 03:01:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 12:07:54 CST 2008.