HomePhabricator
Diffusion Comm 9158eb67865b

[lib] Run conversion only on state check

Tags
None
Referenced Files
F661688: image.png
Jul 28 2023, 6:09 AM
File Not Attached
F661638: image.png
Jul 28 2023, 6:09 AM
File Not Attached
F661658: image.png
Jul 28 2023, 6:09 AM
File Not Attached
Subscribers
None

Description

[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:

image.png (1×1 px, 250 KB)

After the changes:
image.png (1×464 px, 195 KB)

You can see that the conversion doesn't run.

For comparison here's the graph for the current master:

image.png (1×1 px, 155 KB)

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

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Jul 28 2023, 3:56 AM
Reviewer
kamil
Differential Revision
D8649: [lib] Run conversion only on state check
Parents
rCOMMfa412e696c0b: Improve error logging for olm session creation failure
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM9158eb67865b: [lib] Run conversion only on state check (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Jul 28 2023, 6:09 AM