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
