I have a large list of items to update and I need to set prices.
for...
currentItem.attributes.menuItemPrice10 = currentItem.attributes.menuItemPrice1 + .28;
await this.menuItemsService.save(currentItem);
While this process works fine, I have noticed that Angular has limited threading options.
If I remove the await keyword, the script quickly goes through the list, but it doesn't seem to update everything based on the logs - it's like some updates are being skipped because I didn't wait for them to complete, right?
So, I'm considering using web workers as an alternative, but I read that it does not support running 'itself' as a web worker and may have platform limitations. I'm not exactly sure what that means, so I'm seeking advice on the best practice to speed up this process.
Thank you