[lib] Run conversion only on state check
Summary:
ENG-4524
The id schema conversion for the state check was run everytime selector needed to be rerun, even when it wasn't necessary (e.g. navigating between threads). This diff changes it to so that the conversion is run only when the state check is requested from the keyserver.
Test Plan:
- Checked that the state check still runs correctly
- Can't reproduce the performance problem on my machine (too small redux) but checked the performance graph in the browser when navigating between threads:
Before the changes:
After the changes:
You can see that the conversion doesn't run.
For comparison here's the graph for the current master:
The highlighted Cn function is the id schema conversion function
Reviewers: kamil, tomek, ashoat
Reviewed By: kamil, ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8649