fdo#76260 - don't allocate and free std::strings on each element.
This debug code is quite expensive; 2.5% of document load time; Avoid the pointless heap allocation, and punt the rest to fdo#80798. Change-Id: I499b3cf48867d5ed0f2b33b9d12f1c128c993aae
This commit is contained in:
@@ -402,8 +402,9 @@ bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t x,
|
||||
*/
|
||||
|
||||
OOXMLPropertySetImpl::OOXMLPropertySetImpl()
|
||||
: msType("OOXMLPropertySetImpl")
|
||||
{
|
||||
static OString aName("OOXMLPropertySetImpl");
|
||||
maType = aName;
|
||||
}
|
||||
|
||||
OOXMLPropertySetImpl::~OOXMLPropertySetImpl()
|
||||
@@ -449,7 +450,7 @@ OOXMLPropertySetImpl::end() const
|
||||
|
||||
string OOXMLPropertySetImpl::getType() const
|
||||
{
|
||||
return msType;
|
||||
return string(maType.getStr());
|
||||
}
|
||||
|
||||
void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
|
||||
@@ -497,7 +498,7 @@ OOXMLPropertySet * OOXMLPropertySetImpl::clone() const
|
||||
|
||||
void OOXMLPropertySetImpl::setType(const string & rsType)
|
||||
{
|
||||
msType = rsType;
|
||||
maType = OString(rsType.c_str(), rsType.size());
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DOMAINMAPPER
|
||||
|
@@ -164,7 +164,7 @@ public:
|
||||
typedef std::vector<OOXMLProperty::Pointer_t> OOXMLProperties_t;
|
||||
private:
|
||||
OOXMLProperties_t mProperties;
|
||||
std::string msType;
|
||||
OString maType;
|
||||
public:
|
||||
OOXMLPropertySetImpl();
|
||||
virtual ~OOXMLPropertySetImpl();
|
||||
|
Reference in New Issue
Block a user