shiny-r-optimize

Solid

Diagnose and fix performance problems in Shiny for R apps — slow startup, sluggish interactions, long-running blocking operations, and apps that struggle beyond a handful of concurrent users. Use when a Shiny app is slow, hangs, recomputes too much, times out, or needs to support more users; when the user asks to "speed up", "optimize", or "make faster" an existing Shiny app; or when preparing a prototyped app for real-world traffic.

Data & Documents 568 stars 60 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
92
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Optimizing Shiny App Performance Make an existing Shiny for R app faster without changing what it does. The typical user has an app that worked fine for one or two developers and is now too slow or must support more users. Keep all app logic intact; prefer code changes over deployment tuning; resist rewrites. Order of preference for every fix: 1. **Eliminate** work that isn't needed (don't compute outputs nobody is looking at; don't compute with inputs that aren't ready). 2. **Reuse** work that repeats (shared reactives, caching). 3. **Accelerate** unavoidable work (faster data formats, vectorized code). 4. **Relocate** work that blocks (async / background tasks) — last resort; it buys concurrency, not raw speed. ## Workflow ### 1. Understand the complaint Pin down what "slow" means and write it as a benchmark to beat: - **What feels slow?** First page load? Every interaction? One specific action? Only when several people use it at once? - **How many concurrent users** must it support? (1–5, ~20, hundreds?) - **Where does it run?** Locally, Posit Connect, Posit Connect Cloud, Shiny Server? - **How big is the data**, where does it live, and how often does it change? ### 2. Scan the source for smells — and fix them now Read the app code (`app.R` / `server.R` / `ui.R` / modules) and look for the classic smells. Every smell in this table has a **safe, behavior-preserving fix**: apply each fix you find *immediately*, before measuring. These ten changes fix the...

Details

Author
posit-dev
Repository
posit-dev/skills
Created
12 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category