I noticed this while coding, and now that I'm documenting / writing up, I
thought I'd mention it.

We seem to be doing a lot of work copying and comparing std::string.  I
bumped into this when I wrote the BeamedGroup class, which stores the beam
type property.  Seg violation, seg violation, seg violation, until I
realized that std::string deep-copies everything, so deleting an event
deletes various strings' contents.

I'm not sure of its performance impact, because it's basically everywhere
and it's hard for us to measure, coming from a standard library.

Nevertheless, there may well be an optimization opportunity.  We have an
interned string type, PropertyName.  It could serve very well.  Only a few
properties really do want a local string, eg properties for Text events.

I'm not planning to do anything about this, but I thought I'd mention it
so the team is aware of it.

        Tom Breton (Tehom)



------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to