- Add tracing code for functions that records call count and total time spent, as well as average time per call. This would implement selective profiling. - Make sure that if any constructors cause memory to be allocated, that the memory is held by an auto_ptr until the constructor is done; otherwise, an exception raised from within the constructor will not call the destructor to free the memory. - Using mmap for the binary reader; or determine if the performance is even worth the maintenance headaches of that code altogether. - Rewrite the error context reporting logic, then tie in the logging facility to it (so that warning can be reported with context, and debug statements can be filtered by context). PUSH_CONTEXT("amount.divide"); POP_CONTEXT(amount_context2("Dividing amounts", amt1, amt2));