# HG changeset patch # User helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1281707642 0 # Node ID a46368b3d8a0b77cd2f7ba22443a1967c21fcd8b # Parent 2de93d36ca6db1e1125275adfdbaede4bb2567a8 * Added checks to setRotation() and setLocation() to prevent performance decrease. * Commented out the sanityCheck() in pool destructor, it is only usefull for debugging and slows down the engine destruction massively. diff -r 2de93d36ca6d -r a46368b3d8a0 engine/core/model/structures/instance.cpp --- a/engine/core/model/structures/instance.cpp Wed Aug 11 16:52:57 2010 +0000 +++ b/engine/core/model/structures/instance.cpp Fri Aug 13 13:54:02 2010 +0000 @@ -219,20 +219,24 @@ } void Instance::setLocation(const Location& loc) { - m_location = loc; - if(isActive()) { - refresh(); - } else { - initializeChanges(); + if(m_location != loc) { + m_location = loc; + if(isActive()) { + refresh(); + } else { + initializeChanges(); + } } } void Instance::setRotation(int rotation) { - m_rotation = rotation; - if(isActive()) { - refresh(); - } else { - initializeChanges(); + if(m_rotation != rotation) { + m_rotation = rotation; + if(isActive()) { + refresh(); + } else { + initializeChanges(); + } } } diff -r 2de93d36ca6d -r a46368b3d8a0 engine/core/util/resource/pool.cpp --- a/engine/core/util/resource/pool.cpp Wed Aug 11 16:52:57 2010 +0000 +++ b/engine/core/util/resource/pool.cpp Fri Aug 13 13:54:02 2010 +0000 @@ -46,7 +46,8 @@ Pool::~Pool() { FL_LOG(_log, LMsg("Pool destroyed: ") << m_name); printStatistics(); - sanityCheck(); + // This is only usefull for debugging + //sanityCheck(); reset(); std::vector::iterator loader; for (loader = m_loaders.begin(); loader != m_loaders.end(); loader++) {