Only call Thread.setName(...) if needed because of the security check overhead