Skip to content

Improve performance - #242

Open
abigailalexander wants to merge 9 commits into
masterfrom
improve-screen-load-performance
Open

abigailalexander wants to merge 9 commits into
masterfrom
improve-screen-load-performance

Conversation

@abigailalexander

@abigailalexander abigailalexander commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

This PR includes several fixes for code that was causing slow loading times, as well as other related bugs

  • Use redux prepareAutoBatched to batch pv subscribe and unsubscribe actions. This allows us to load widget heavy screens quicker
  • Add a CACHE_PRESERVE_PERIOD option to config, which can be used to set a timeout for when the PV cache is cleared after a socket is closed. This is needed since in versions <0.10.5 we kept the cache indefinitely, which prevents flashes of #### when loading already-opened screens, but this was removed to make it clearer when PV values are stale. In some contexts (e.g. machine status, which continually rotates through several screens) keeping the cache is helpful. The default is zero (cache is immediately cleared) but applications can now modify this as needed
  • Update PV value selector to create new selector rather than reuse one. This improves efficiency of PV value fetching because each selector now only checks if specific values in the cache have changed, and isn't triggered by other components PV changes.
  • crypto.randomUUID(), which we use for generating unique ids, does not exist in insecure http contexts. This caused the application to error. If the function doesn't exist, we now fall back to a different crypto function for generating ids

With these changes, the loading time and PVWS connection time for screens should be decreased.

@abigailalexander

Copy link
Copy Markdown
Collaborator Author

Also added the suggested change to make Readback a normal div instead of using the Mui Textfield

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant