Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2007-01-24 09:05:23

Bugs item #1643575, was opened at 2007-01-24 06:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Performance problem in iostreams

Initial Comment:

iostreams dumps its internal buffers every time seekg or tellg is called even if the seek is to the current position. The following function should check if the seek position is within the buffer and, if so, adjust the buffers.

template<typename T, typename Tr, typename Alloc, typename Mode>
typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
indirect_streambuf<T, Tr, Alloc, Mode>::seek_impl
    (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
    if (pptr() != 0)
        this->BOOST_IOSTREAMS_PUBSYNC(); // sync() confuses VisualAge 6.
    if (way == BOOST_IOS::cur && gptr())
        off -= static_cast<off_type>(egptr() - gptr());
    setg(0, 0, 0);
    setp(0, 0);
    return obj().seek(off, way, which, next_);



You can respond by visiting:

Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at