* BBufferIO did not implement Seek() and Position() correctly; it just passed

it to the stream. This caused Read()/Write() to need two syscalls for nothing
  (this only caused the actual stream to share the same position with the
  BBufferIO, something you just cannot rely on when using buffered I/O).
* Anyway, this reduces the time VirtualBox needs to open some RAW test images
  from over 4 minutes to less than 15 seconds...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28662 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-11-16 21:23:45 +00:00
parent 5d029ca0bd
commit 1b21be7091
2 changed files with 59 additions and 39 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Copyright 2007-2008, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _BUFFER_IO_H
@@ -40,7 +40,8 @@ class BBufferIO : public BPositionIO {
char* fBuffer;
size_t fBufferSize;
size_t fBufferUsed;
uint32 _reserved_ints[6];
off_t fPosition;
uint32 _reserved_ints[4];
bool fBufferIsDirty;
bool fOwnsStream;
bool _reserved_bools[6];