Thanks Rui, changes now merged and submitted to svn/trunk.
On 2 April 2012 07:53, Wang Rui <[email protected]> wrote: > Hi Robert and Max, > > I'd like to submit the changes that will put ObjectProperty and ObjectMark > variables into the InputStream/OutputStream class instead of static ones. > This should avoid the threading problem and > won't repeatedly reallocate memory for the properties. Some of the wrappers > will be slightly modified to use the property variable stored in the > InputStream/OutputStream as well. > > Max, could you please help test the submission with your data which may > crash with previous OSG version? The new code is based on the latest trunk. > > Thanks, > > Wang Rui > > > 2012/3/30 Robert Osfield <[email protected]> >> >> Hi Rui, >> >> On 30 March 2012 09:10, Wang Rui <[email protected]> wrote: >> > The original goal of the PROPERTY macro is to read a property name >> > string >> > from the osgt/osgb file. The read string is only used for comparing with >> > the >> > preserved one and will be thrown away after that. So a temporary >> > variable is >> > enough for saving it. I agree that we could have a member ObjectProperty >> > in >> > InputStream/OutputStream to avoid threading problems. But the >> > macro PROPERTY should be slightly changed to INPUT_PROPERTY and >> > OUTPUT_PROPERTY so that wrapper writers could understand them smoothly. >> > >> > I would try to fix the problem this weekend. >> >> Thanks for looking into the problem. >> >> One thing it would be good to do to if possible avoid the assignments >> of the strings that are currently required. I do wonder if one could >> move the ObjectProperty storage into the Serializer object, so you >> have one ObjectProperty per property used by the Serializer, then >> reuse this Property when doing the input or output. I know this >> approach would provide the best performance for reading/writing as >> it'd avoid the thrashing of the ObjectProperty object, and also avoid >> the threading issue at the same time, however, it would seem to be a >> more complex solution in terms of creating each individual serializer >> setup. Perhaps one could declare the ObjectProperty statically in the >> serializer .cpp files and then resuse this. >> >> Thoughts? >> Robert. >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
