Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between buffered and unbuffered code?

Tags:

javascript

pug

This documentation is confusing.

It says, unbuffered code does not output any code directly. What does that mean?

But in general, what is the difference between buffered and unbuffered code?

Would also be nice if they didn't disable copy and right click on the page too!

like image 908
Ian Warburton Avatar asked Nov 14 '14 14:11

Ian Warburton


People also ask

What is buffered and unbuffered in C?

There are three possible modes: "fully buffered" (read or write in substantial chunks); "line buffered" (buffer until a '\n' character is read or written, but not beyond that); and "unbuffered" (all reads and writes go to the OS immediately).

What is unbuffered in programming?

Unbuffered I/O bypasses the file system cache and avoids double-caching of data within the server process and the file system cache. The c-treeACE configuration option UNBUFFERED_IO enables unbuffered I/O for the specified file.

What does unbuffered mean?

: not buffered: such as. : not marked off by a protective zone or device. unbuffered bike lanes. … hit an unbuffered concrete wall …


1 Answers

"Unbuffered" means that the code is executed, but the results are not sent to the output buffer.

"Buffered" also means that the code is executed, and the results are sent to the output buffer.

For example, this Jade:

.unbuffered
  - 'unbuffered vs buffered'

.buffered
  = 'unbuffered vs buffered'

Produces this HTML:

<div class="unbuffered">
</div>
<div class="buffered">unbuffered vs buffered
</div>
like image 67
matty Avatar answered Sep 30 '22 12:09

matty