A pre-computation survey landing page (or other UI speed improvements) #255
Replies: 2 comments 6 replies
-
|
Hi! Thanks for using surveydown. Performance is definitely a challenge, and it's something we can try to keep working on. I am curious though why you are having issues specifically with We have it on our roadmap to make storing different things optional, as right now we record all the time stamps of each page and question, which doubles the number of columns in the database. Turning off some of those options (when we enable that) should also help. |
Beta Was this translation helpful? Give feedback.
-
|
Ah, okay so a few things. First, I see Finally, you could speed things up by pre-defining the randomization and storing it inside a csv file (see here). That way you could read in the pre-randomized set of values as a csv (which you can do at the top of your # Randomly choose a row id
random_id <- sample(design$id, 1)
# Store the chosen id in the survey data
sd_store_value(random_id)Then all other values could be loaded from the |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Description
I like surveydown a lot and I'm working towards trying it at scale for research asap. The main obstacle is performance, specifically waiting time for users. I've set up short test surveys (with embedded experiments) deployed to Posit Connect Cloud with Supabase as the backend. In an attempt to improve performance, I am trying out the Basic plan on PCC ($19/mo) and the Pro plan on Supabase ($25/mo). However, it is still slow for (test) users.
In particular, I notice that saving data to the Postgres DB with sd_store_value() is slow (often >1 sec per call). In my simple test survey, I am running sd_store_value() 10 times, which results in >10 seconds load time – and I would need to store more than 10 values for production.
The best thing would be if there were ways to speed up interactions with the DB. But one possible simple improvement of the user experience would be implementing a static landing/welcome page and have all the Shiny app code, including sd_store_value() calls, run in the background. This page could include a welcome message, consent, etc. that respondents need time to read anyway.
I'm also very interested in hearing other people's experience with performance, infrastructure (Supabase etc.), and tips for improving waiting time.
Thanks a lot for your work on the surveydown project!
Beta Was this translation helpful? Give feedback.
All reactions