Congratulations on narrowing this down. As a way of explanation, the red line is an entry point to a sub-scene graph traversal. FindCompileableGLObjectsVisitor is a NodeVisitor, which when passed to a node->accept() kicks off a traversal. Each of the apply methods you find in the class defined in osgDB/DatabasePager.cpp are called for each of the relevant objects.
However, I must cast a bit of doubt here because the operations that this does are very light weight. Their effect, however, down the line in the draw traversal, are potentially heavy. That is, new display lists need to be created and new textures need to be downloaded on first draw. So commenting out that line would cause display lists not to be created, for example, which is a potentially heavy task (and, well, again, I/O limited - not _file_ I/O, but I/O nonetheless).
Just for kicks, you might try experimenting a little with some of the finer grained parameters to the database pager, such as DO_NOT_MODIFY_DRAWABLE_SETTINGS, or
USE_DISPLAY_LISTS, etc.
-don
On 8/22/06, Zach Deedler <[EMAIL PROTECTED]> wrote:
Hello all,I have fixed the database hitching problem!set OSG_DO_PRE_COMPILE=OFFCan anybody tell me why the red line below was causing me the hitching problems?if (_doPreCompile && databaseRequest->_loadedModel.valid() && !_activeGraphicsContexts.empty())
{
// force a compute of the loaded model's bounding volume, so that when the subgraph
// merged with the main scene graph and large computeBound() isn't incurred.
databaseRequest->_loadedModel->getBound();
ActiveGraphicsContexts::iterator itr = _activeGraphicsContexts.begin();DataToCompile& dtc = databaseRequest->_dataToCompileMap[*itr];
++itr;// find all the compileable rendering objects
FindCompileableGLObjectsVisitor frov(dtc,
_changeAutoUnRef, _valueAutoUnRef,
_changeAnisotropy, _valueAnisotropy,
_drawablePolicy);databaseRequest->_loadedModel->accept(frov);if (!dtc.first.empty() || !dtc.second.empty())
{
loadedObjectsNeedToBeCompiled = true;// copy the objects from the compile list to the other graphics context list.
for(;
itr != _activeGraphicsContexts.end();
++itr)
{
databaseRequest->_dataToCompileMap[*itr] = dtc;
}
}
}Also, just so you know, I have tried turning off precompile before but that was before I synched to the latest OpenThreads, so I don't know if that had anything to do with it. Now, the paging seems to behave much like Linux, (occasional hitches but nothing for periods of multiple seconds). The paging thread no longer gets 100% of the processor time ever.So, it doesn't look like it was a file I/O thing after all!
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
