HI Aaron,
I'm no expert on the downloading data over the net so I'll defer to
others on this topic.
On the DatabasePager front, it was originally designed to just read on
file in at a time, as the loaders themselves weren't thread safe.
This is obviously why you getting file loads one at a time.
Since then I've done work to make the ones that can be thread safe
allow multiple load requrests at one time, and the others to serialize
calls to them, and osgDB::Registry has also been rework to be more
able to handle multiple parallel read/write calls. This does open the
door to loading multiple files at once.
To enable multiple files to be read at once by the DatabasePager it
will have to manage a pool of threads, and a means of syncronizing
when loads have been completed. This won't be a trivial change, but
shouldn't immensly complicated.
Robert.
On 7/6/06, Aaron Rolett <[EMAIL PROTECTED]> wrote:
Hi all,
I'm currently writing an openscenegraph program that makes very
heavy use of paged lods and the net plugin to pull in remote data.
However, I'm finding that the performance is just awful when pulling
down ives/pngs from remote servers. Both ends of the connection are
on fairly high bandwidth connections (400kbs downloads between the
two).
So ... I want to work on improving the network connection / loading
and I would like to do it in such a way that there is a possiblity
that my changes would get merged back into the main openscenegraph
source tree at some point. There seem two problems that are causing
the slow down at this point in time. The first is that the net plugin
uses http 1.0 (no persistant connections) and reopening tcp
connections to remote servers is quite costly. The second is that only
one request is happening at a time (if there are 4 pagedlod children
... it *seems* like they are requested from the webserver one after
another instead of in parallel).
My ideas for countering these two issues:
For the net plugin ... we could have several persistant
connections open at once ... ready to be used. Would it be ok to
depend on an external http 1.1 library to do this? Right now a single
connection is opened and closed for each read. What I'm thinking of
instead is several open tcp connections through which requests are
made. In terms of actually impelmenting this in the plugin ... I'm
guessing we would need to add some new options --- like
usePersistantConnection and persistantConnectionTimeout=(seconds).
The second issue seems like it would require changing the
DatabasePager. The goal would be to make the Pager try and pull in
several of the new levels of detail from the remote webserver at the
same time. It *seems* like this would involve changing the run() loop
try so that more than one file could be grabbed at a time.One thing
that looks like it might be an issue is that readNodeFile might not be
thread-safe (according to a comments on line 509 in
DatabasePager.cpp). Is this true? If so how could I go about bringing
in several pagedlod children at once?
Is this the best place to implement these changes?
I'd love to hear comments from people as I would like to do this the
*right/tidy* way if at all possible.
Cheers!
Aaron
_______________________________________________
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/