I encountered the same issue as #20640 but using `react-devtools` as a stand-alone app instead of from the the browser.

The bottom line is that the profiler becomes unresponsive after any interaction with a heavily loaded react page.

React version:

* React: 17.0.2
* ReactDOM: 17.0.2
* React Devtools: 4.18.0

## Steps To Reproduce

1. Attach a react-devtools stand-alone (`yarn run react-devtools`) to a session
2. Start profiling
3. Do something on your app that would cause a huge number of updates
4. The profiler stops functioning

## Diagnostics

I actually went through and found out the origin of the issue, however I am not sure what would be the best approach to fix it.

It seems the the origin is a (very) big incoming message:

<img width="516" alt="image" src="https://user-images.githubusercontent.com/883486/132918559-c6a3dee1-1ddd-4647-ab06-2f19892b67b0.png">

That eventually causes a maximum call stack exceeded error:

<img width="522" alt="image" src="https://user-images.githubusercontent.com/883486/132918578-f02f3031-b84a-4a89-84cf-4dd4d70cef7f.png">

Coming from `util.js:128`:

```ts
export function utfDecodeString(array: Array<number>): string {
  return String.fromCodePoint(...array);
}
```

And interestingly enough, doing spread operator with an array with 235124 elements actually causes a `Maximum call stack size exceeded` error 😄 

I tried replacing the code above with the following replacement and it seems to work:

```ts
export function utfDecodeString(array: Array<number>): string {
  return array.map(c => String.fromCodePoint(c)).join("")
}
``` 
}
  let displayName = fallbackName;
   The displayName property is not guaranteed to be a string.
   It's only safe to use for our purposes if it's a string.
   github.comfacebookreact-devtoolsissues803
  if (typeof type.displayName === 'string') {
    displayName = type.displayName;
  } else if (typeof type.name === 'string' && type.name !== '') {
    displayName = type.name;
  }
  cachedDisplayNames.set(type, displayName);
  return displayName;
}
let uidCounter: number = 0;
export function getUID(): number {
  return ++uidCounter;
}
export function utfDecodeString(array: Array<number>): string {
  return String.fromCodePoint(...array);
}
export function utfEncodeString(string: string): Array<number> {
  const cached = encodedStringCache.get(string);
  if (cached !== undefined) {
    return cached;
  }
  const encoded = new Array(string.length);
  for (let i = 0; i < string.length; i++) {
    encoded[i] = string.codePointAt(i);
  }
  encodedStringCache.set(string, encoded);