Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using renderUI, as it is slow #172

Open
sckott opened this issue Nov 1, 2024 · 0 comments
Open

Avoid using renderUI, as it is slow #172

sckott opened this issue Nov 1, 2024 · 0 comments
Labels
later Deal with later low priority Not urgent or critical, implement whenever

Comments

@sckott
Copy link
Collaborator

sckott commented Nov 1, 2024

I've recently cleared out some uses of renderUI #171

We still have ~ 15 instances of renderUI though on branch dev. Some of which are fine as they're doing something small, but for larger tasks we should avoid it's use.

I can't find a nice reference to this, but many SO posts and blog posts mention that renderUI is slow. It makes sense becuase it is used in the server side of Shiny, so you're rendering UI elements on the server, which is going to take more time than if you do it on the client.

In addition use of renderUI means that the UI element it creates is not there when the page first renders but at some later point, so it's a bad user experience - UNLESS the task is very quick then the lag shouldn't matter much.

Instead we should replace uses of renderUI with update* for whatever element type it is, e.g., updateTextInput

@sckott sckott added later Deal with later low priority Not urgent or critical, implement whenever labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
later Deal with later low priority Not urgent or critical, implement whenever
Projects
None yet
Development

No branches or pull requests

1 participant