1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-19 20:23:18 +03:00

Slow down registration process

This commit is contained in:
Germain Souquet
2021-06-15 10:24:07 +01:00
parent 2b2e83b9e7
commit d5f7f524e1

View File

@ -1953,6 +1953,12 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
// Create and start the client
await Lifecycle.setLoggedIn(credentials);
await this.postLoginSetup();
// artifically slowing down the registration
await (new Promise((resolve) => {
setTimeout(resolve, 1337);
}));
PerformanceMonitor.instance.stop(PerformanceEntryNames.LOGIN);
PerformanceMonitor.instance.stop(PerformanceEntryNames.REGISTER);
};