NV/chrome-devtools-autosave-server — Issue #1: Queue file writes
Author: NV
Created: 2011-10-15 12:15:47+00:00
State: open

Let's say we have 3 request happens almost at the same time

request #1
|
r1
r2
r3

We begin writing to the file when request event 'end' fires. Writing to the file takes much more time than processing a request (parse HTTP headers and stuff).

begin writing end writing
| |
r1-b------------e
r2
r3

Where is no need to write second request `r2`. We could just write the third `r3` when the first is done.

begin writing end writing
| |
r1-b------------e
r2
r3....b------------e

Or, we could stop writing the current request when the next one is available.

stop writing
|
r1-b-----s
r2--b-s
r3-b------------e