highfidelity/hifi — pull request #2376 by ZappoMan (2014-03-19 08:27:38+00:00)
Title: Voxel Server Performance Improvements

* Make sure to set last heard time so agents don't drop servers
* Add Q_OBJECT to headers to RTTI and Signals/Slots works correctly for Qbjects
* remove a bunch of old dead debugging
* replace internals of OctreeElementBag with QSet for slightly improved insert performance
* added a bunch of timing/sending stats to the Octree Server http status page
* improve performance of Octree::encodeTreeBitstreamRecursion() by optimizing inFrustum() checks to leverage known parent element frustum status
* fix SimpleMovingAverage::reset() to actually reset state properly
* removed the old implementation of element deleting/encoding in Octree that attempted to handle simultaneous encodes and deletes, since these operations are now properly guarded by QReadWriteLock, this code was redundant and just slowing us down.
* fixed several crashes in thread shutdown related to domain shutdown and/or voxel-server restart while clients connected.
* added aboutToFinish() to ThreadedAssignment, to allow subclasses to handle cleanup before the finished() signal is emitted. This allows the OctreeServer to clean up any data associated with connected clients before the node list gets cleared, since the timing of assignment and node list cleanup happens simultaneously, the finished() signal can't be used reliably to clean up these resources.