• mtomasz@chromium.org's avatar
    [fsp] Introduce BufferingFileStreamReader to read files in bigger chunks. · 21ee3917
    mtomasz@chromium.org authored
    Default chunk size is 32KB and it is too small for provided file systems, which
    require IPC calls for each chunk. Such small chunks cause the IPC overhead to
    slow down the reading process drastically.
    
    Moreover, since there is no streaming support in XMLHttpRequest, returning
    data in chunks in providing extensions, requires making separate HTTP requests
    with appriopriate Range header. That introduces another overhead.
    
    This patch introduces a wrapper on a FileStreamReader, which converts 32KB
    chunk requests to 512KB chunk requests to the underlying file stream  reader.
    
    As a result, the overhead of IPC and HTTP is decreased significantly.
    
    TEST=unit_tests: *FileSystemProvider*BufferingFileStreamReader*
    BUG=248427
    
    Review URL: https://codereview.chromium.org/318563002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282290 0039d316-1c4b-4281-b951-d872f2087c98
    21ee3917
chrome_browser_chromeos.gypi 67.7 KB