Speed up the process
Options
![Valentin R](https://us.v-cdn.net/6037124/user_avatars/4304535.jpg)
Valentin R
Member ✭
I have an intake endpoint that will be getting a lot of user data. The function stack adds/updates a db record, then validates several conditions (involves hitting external APIs), and then prepares and sends an email to the user.
I've noticed that this whole process takes about a second to run for every new record. I expect a large volume and wondering how to speed up the process so that a posting server doesn't need to wait too long for a response to process the next item in its queue (at least that's how I imagine this happening 😆).
Got a couple of ideas, but maybe there is a better way. Please suggest.
1. Break the process into two? I am thinking of creating a "temporary" table for internal queuing. New records will be added there and then a task will be picking up new records in some batches, processing those and removing them from the temp db.
2. Or maybe I can do something in the main intake function stack that would accept a new user record and push it to another xano endpoint? Or will this still hold up the intake process until that other endpoint responds?
I've noticed that this whole process takes about a second to run for every new record. I expect a large volume and wondering how to speed up the process so that a posting server doesn't need to wait too long for a response to process the next item in its queue (at least that's how I imagine this happening 😆).
Got a couple of ideas, but maybe there is a better way. Please suggest.
1. Break the process into two? I am thinking of creating a "temporary" table for internal queuing. New records will be added there and then a task will be picking up new records in some batches, processing those and removing them from the temp db.
2. Or maybe I can do something in the main intake function stack that would accept a new user record and push it to another xano endpoint? Or will this still hold up the intake process until that other endpoint responds?
Comments
-
Option 1 sounds good to me.
I'm going to do something similar for incoming webhooks - save the 'raw' data from the endpoint in one table. And then having a background task to work through the new entries in it's own time. -
yep, ended up doing it like that. I left a few functions in the webhook and it now runs a second quicker.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback