Questions tagged [buffering]

Buffering is a process of temporarily storing data while it is being moved from one place to another.

Buffering is a process of temporarily storing data while it is being moved from one place to another. A buffer often adjusts timing by implementing a queue (or FIFO) algorithm in memory, simultaneously writing data into the queue at one rate and reading it at another rate.

Use this tag for programming questions related to data buffer and the process of buffering.

Source: Wikipedia

493 questions
10
votes
1 answer

WCF Streaming and maxReceivedMessageSize

Why is the maxReceivedMessageSize property relevant when implementing WCF Streaming? Since buffering and persistence is handled by the consumer of the stream, why does WCF concern itself with how big or long a single service operation could…
Martin Bliss
  • 1,043
  • 7
  • 24
9
votes
5 answers

Using Core Graphics/ Cocoa, can you draw to a bitmap context from a background thread?

I'm drawing offscreen to a CGContext created using CGBitmapContextCreate, then later generating a CGImage from it with CGBitmapContextCreateImage and drawing that onto my view in drawRect (I'm also drawing some other stuff on top of that - this is…
philsquared
  • 22,403
  • 12
  • 69
  • 98
9
votes
1 answer

How to tell Django not to buffer the HTTP POST data?

The client is posting mjpeg stream as HTTP POST: POST /feed/testfeed HTTP/1.0 Content-type: multipart/x-mixed-replace; boundary=--myboundary --myboundary Content-length: 14179 Content-type: image/jpeg ....JFIF.... .... I see no incoming data in…
Vi.
  • 37,014
  • 18
  • 93
  • 148
9
votes
1 answer

Buffering while converting stream to frames with ffmpeg

I am trying to convert udp stream into frames using ffmpeg. I run following command: ffmpeg -loglevel debug -strict 2 -re -i "udp://192.168.15.50:3200?fifo_size=1000000&overrun_nonfatal=1" -r 8 -vf scale=432:243 -f image2pipe -vcodec ppm pipe:1 It…
Pavel K.
  • 6,697
  • 8
  • 49
  • 80
9
votes
2 answers

PHP's ob_flush() causing error

When I call PHP's ob_flush() function on my localhost (via MAMP) I get the following error: Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush. The only solution I can find is to prefix it with @, but this doesn't…
philfreo
  • 41,941
  • 26
  • 128
  • 141
9
votes
2 answers

Is triple buffering really a free performance boost?

So I've been reading a lot about openGL and gpus and graphics in general, and triple buffering is semi-frequently mentioned as giving a free performance boost. I know why it helps; in effect, you can do v-sync without being limited to a framerate…
amara
  • 2,216
  • 2
  • 20
  • 28
9
votes
3 answers

What is a suitable buffer for Python's struct module

In Python I'm accessing a binary file by reading it into a string and then using struct.unpack(...). Now I want to write to that string using struct.pack_into(...), but I get the error "Cannot use string as modifiable buffer". What would be a…
mdm
  • 5,528
  • 5
  • 29
  • 28
9
votes
4 answers

Simulate poor bandwidth in a testing environment (Mac OS X)?

We have a customized Flash/HTML5 video player we use for users on our site. I'm currently fleshing out the experience for users who have 'suboptimal' bandwidth--basically we'd like the client side code to be able to detect poor user experience due…
Chris W.
  • 37,583
  • 36
  • 99
  • 136
8
votes
2 answers

Is a Youtube buffer finish event possible

Is it possible to detect the finish of a youtube buffering through javascript? Here http://code.google.com/intl/de-DE/apis/youtube/js_api_reference.html are a lot of methods but no one has an event that says "finished with buffering".
Bartosz Stankiewicz
  • 323
  • 1
  • 2
  • 10
8
votes
1 answer

Android VideoView, seamless playback during orientation change

I'm using a VideoView to play a mp4 file in my application. Is there a way to save all the content that was buffered so when the orientation of the screen is changed the user doesn't have to wait another 10 seconds or more for the video to start…
bradley4
  • 3,823
  • 6
  • 34
  • 41
8
votes
2 answers

How do I intercept the unbuffered output of a Proc::Async in Raku?

With a snippet like # Contents of ./run my $p = Proc::Async.new: @*ARGS; react { whenever Promise.in: 5 { $p.kill } whenever $p.stdout { say "OUT: { .chomp }" } whenever $p.ready { say "PID: $_" } …
jja
  • 2,058
  • 14
  • 27
8
votes
4 answers

is there COMMIT analog in python for writing into a file?

I have a file open for writing, and a process running for days -- something is written into the file in relatively random moments. My understanding is -- until I do file.close() -- there is a chance nothing is really saved to disk. Is that…
user63503
  • 6,243
  • 14
  • 41
  • 44
8
votes
1 answer

FileChannel#force and buffering

I would like to make it clear and draw some parallels between FileOutputStream and FileChannel right now. So first of all, it seems like the most efficient way to write file with standart Java io is to use FileOutputStream which is wrapped with…
Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85
8
votes
6 answers

std::ifstream buffer caching

In my application I'm trying to merge sorted files (keeping them sorted of course), so I have to iterate through each element in both files to write the minimal to the third one. This works pretty much slow on big files, as far as I don't see any…
ledokol
  • 81
  • 1
  • 4
8
votes
2 answers

StreamReader and buffer in C#

I've a question about buffer usage with StreamReader. Here: http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx you can see: "When reading from a Stream, it is more efficient to use a buffer that is the same size as the internal…
gravitar
  • 81
  • 1
  • 1
  • 2