fix profile thread performance issue.