tellg call removed from StreamOperator's checkStream function, because reading of files (readNodeFile etc.) with tellg on 'every iter' is approximately 100 times slower on Emscripten platform
This commit is contained in:
parent
4bc1320709
commit
cf2b5d030c
@ -16,21 +16,14 @@
|
|||||||
|
|
||||||
using namespace osgDB;
|
using namespace osgDB;
|
||||||
|
|
||||||
static long long prev_tellg = 0;
|
|
||||||
|
|
||||||
void InputIterator::checkStream() const
|
void InputIterator::checkStream() const
|
||||||
{
|
{
|
||||||
if (_in->rdstate()&_in->failbit)
|
if (_in->rdstate()&_in->failbit)
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"InputIterator::checkStream() : _in->rdstate() "<<_in->rdstate()<<", "<<_in->failbit<<std::endl;
|
OSG_NOTICE<<"InputIterator::checkStream() : _in->rdstate() "<<_in->rdstate()<<", "<<_in->failbit<<std::endl;
|
||||||
OSG_NOTICE<<" _in->tellg() = "<<_in->tellg()<<std::endl;
|
OSG_NOTICE<<" _in->tellg() = "<<_in->tellg()<<std::endl;
|
||||||
OSG_NOTICE<<" prev_tellg = "<<prev_tellg<<std::endl;
|
|
||||||
_failed = true;
|
_failed = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
prev_tellg = _in->tellg();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputIterator::readComponentArray( char* s, unsigned int numElements, unsigned int numComponentsPerElements, unsigned int componentSizeInBytes)
|
void InputIterator::readComponentArray( char* s, unsigned int numElements, unsigned int numComponentsPerElements, unsigned int componentSizeInBytes)
|
||||||
|
Loading…
Reference in New Issue
Block a user