Creating a CSV Using a Backend Workflow

Continuing the discussion from Be Aware: Looking at Your Data Tab Uses Your Plan's CPU:

@equibodyapp starting a new thread, since I know I struggled with finding an answer to this and maybe it would be good to just make a post about it. To answer your question, I think it depends on your definition of “efficient”. For our app, which does education/activity tracking, the CSV of all student activities/grades/etc. doesn’t need to generate right away, so I gave users 2 options:

  1. Create an on-demand report. This runs a backend workflow (BEW 1) that calls itself every 45 seconds, once for each student, so it spreads out the load a bit. If we had 150 people use this at once, it could possibly go over 100% CPU usage, since we’re still on the $29/mth plan with Bubble. But it’s highly unlikely this will happen until we’ve got more users, in which case we’ll upgrade to a better plan anyway.
  2. Create a Scheduled Report that runs either weekly or monthly. This stretches the time between students in the backend workflow (essentially a copy of BEW 1) to 10 minutes, because there’s really no urgency for automated/scheduled reporting to generate everything right now like there would be if we used a frontend workflow and the user is expecting a file to download. This keeps the CPU usage way down, under 4% even when it’s generating a report on several students with 100+ activities each (and activities have 7-10 fields).

We’re using 1T - CSV Creator Plugin | Bubble for creating the CSVs, by the way.

Thanks @samnichols that’s the plugin I use as well :slight_smile:

I need to create on demand CSV’s - I might actually try creating in frontend and seeing if that makes any difference at all - it’s not something I thought would be so resource heavy!

1 Like

Generally frontend uses a lot less resources, so probably the way to go for you.