[FEATURE] speed up auto-tag generation
Looks like JS for loop is far faster than forEach (see video)
The slowest part of the auto-tag generation process is already outsourced to a web worker but it's currently using forEach
- https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/tags-auto/tags.worker.ts#L31
- https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/tags-auto/tags.worker.ts#L59
- https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/tags-auto/tags.worker.ts#L89
We may be able to get 2x the speed with a simple for loop 🤞 🚀 🤞
Hi! can i claim this issue?
Hey @riddhi-b - you've claimed the issue ✅ 🤝
If you can, could you also perform some sort of a speed test to see if the change is worth it? 🙇♂️
@whyboris Thanks! Sure I will try, is there a specific tool or anything you like to use to perform speed checks or are you ok with me using anything I can find?
@riddhi-b - I suspect console.time() is the easiest, though feel free to use whatever you'd like 👍
I would like to address this issue if it is still open.
Hey @Deepak-SBaghel - I believe this was fixed with this PR: https://github.com/whyboris/Video-Hub-App/pull/875