How to use Web Workers in Angular

preview_player
Показать описание
Are you tired of your Angular application freezing when you want to run computationally intense tasks?
In this TechTip , we show you how to set up a Web Worker to run a background process in under X minutes. Using Web Workers for long-running processes can dramatically enhance the user experience and performance of your angular apps,.

Check out our other series 'Tech Tips' videos:

➡️At Hackages, our aim is to connect with our tech community and build educational training sessions to develop your skills as a software engineer. We have an in-house developer team available for consultancy to get your company the IT-development it needs! Contact us below!

🎬Catch up on the Webinar series:

➡️FALL IN LOVE WITH TYPESCRIPT | Hacklunch

➡️COMPONENT DESIGN IN ANGULAR | Hacklunch

➡️Check out all of our current training:

✅Make sure to subscribe to our newsletter, we won't spam you!

👤Connect with us:
Рекомендации по теме
Комментарии
Автор

Thanks a lot . I had a block of code which took 3000ms to execute. There were many organisms that lived and died in that interval 😊

rembautimes
Автор

The first 2 minutes themselves are good enough for me to like this video. Keep it up buddy !!

rhythmkhanna
Автор

This video is very useful for me! You are rock!! Thank you so much!

vutranleanh
Автор

This tutorial is pretty good. You explain everything in pretty simple terms, thanks 👍

TheRealJacobWurz
Автор

Great job and great example! Could you do an example of multiple web-workers for different, but concurrent tasks? For instance, when a user fills out a reactive form and hits “submit.” Would you need different web workers to handle basic tasks like incrementing a formSubmissionCount vs saving the form in an sql user database?

billcooper
Автор

Can we also use this for server Api's? I mean it takes too longer to run in the backend. I did not knew about this till now, so I did background task in my backend, so it wont block UI. But I believe this is client side background handling. So according to you, which is more better - server side or client side?

jaytimbadia
Автор

Do I have to terminate my worker once I'm done using it (like dealing with threads in other languages), or can I just leave it alone and next time I get a new Worker it will use the same "shared thread space" so to speak?

Elven_Red
Автор

Had a doubt (sorry if it sounds stupid, just started with js/ts). Initially when we are calculating prime in the component itself won't js just ignore the return value if it's taking a long time and move to next lines logging the time taken as 0 ?

shervilgupta
Автор

Great Help. Easy to understand and implementation Thanks man 😊😊😊

malikrajat