Is there some possibility to speed up loading of layouts? Are all 40 properties necessary to add for each window?
I have one suggestion to speed up addProperty function:
old code:
Code: Select all
void PropertySet::addProperty(Property* property)
{
if (!property)
{
throw NullObjectException("The given Property object pointer is invalid.");
}
if (d_properties.find(property->getName()) != d_properties.end())
{
throw AlreadyExistsException("A Property named '" + property->getName() + "' already exists in the PropertySet.");
}
d_properties[property->getName()] = property;
}
new code:
Code: Select all
void PropertySet::addProperty(Property* property)
{
if (!property)
{
throw NullObjectException("The given Property object pointer is invalid.");
}
if (!d_properties.insert(PropertyRegistry::value_type(property->getName(),property)).second)
{
throw AlreadyExistsException("A Property named '" + property->getName() + "' already exists in the PropertySet.");
}
}
Could somebody review and submit this code change?