trace-server: performance improvement (#8147)
### Description
- avoid invalidating self time tree spans when they don't have been
accessed
- used multiple core for some computations
### Testing Instructions
<!--
Give a quick description of steps to test your changes.
-->