Right now notes are embedded one at a time. processNextNote sends a single chunk to the worker and waits for the result before sending the next, so there's only ever one request in flight. This can be slow for a large number of notes and it scales linearly with note count.
Figure out how to do this concurrently/in parallel.
Right now notes are embedded one at a time.
processNextNotesends a single chunk to the worker and waits for the result before sending the next, so there's only ever one request in flight. This can be slow for a large number of notes and it scales linearly with note count.Figure out how to do this concurrently/in parallel.