Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

erAnusriM/react-web-worker-playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web worker demo

This project demonstrates the power of web worker. We will be computing the nth prime number where n is 40,000. This takes a significant time for any language and most machines.

There are two situations, in the first case we are doing this work inside a web worker and in the second case we are doing the work inside the main thread. In both the situations open the dev tools to see the logs. Once the prime calculation script starts, the page freezes in the second case, whereas the page stays fine in the firse case with the web worker.

About

WebWorker vs WithoutWebWorker 🔥

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%