Avoid redefining MAGIC, since it's part of Perl's API
Don't allow overriding global settings if there is an active runloop in any thread
Cache stash pointers in TraceFileReader

Not sure about the actual speed increase, done just for the cleaner code.