Skip to content
Web Worker Demo using Angular CLI 8
TypeScript JavaScript HTML CSS
Branch: master
Clone or download
Latest commit cae5dc7 Jun 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
e2e initial commit Jun 15, 2019
src initialize repository Jun 16, 2019
.editorconfig initial commit Jun 15, 2019
.gitignore initial commit Jun 15, 2019
README.md Details on start Jun 19, 2019
angular.json initialize repository Jun 16, 2019
browserslist initial commit Jun 15, 2019
karma.conf.js initial commit Jun 15, 2019
package-lock.json initialize repository Jun 16, 2019
package.json initialize repository Jun 16, 2019
tsconfig.app.json initialize repository Jun 16, 2019
tsconfig.json initial commit Jun 15, 2019
tsconfig.spec.json initial commit Jun 15, 2019
tsconfig.worker.json initialize repository Jun 16, 2019
tslint.json initial commit Jun 15, 2019

README.md

WebWorkersDemo

This project was generated with Angular CLI version 8.0.1.

Usage

Make sure you have Node and the Angular CLI installed.

From a unix-based terminal (I use git-bash on Windows)

git clone https://github.com/Everduin94/Web-Worker-Demo.git
cd Web-Worker-Demo
npm install
ng serve --o

The application is not configured to run the worker or main thread on start-up. So if you want to see the effect on performance when running lighthouse go to src/app/web-worker/web-worker.component.ts and enabled either this.startWebWorker(); or this.startMain() inside of the ngOnInit(){} method.

However, you can simulate either by performing a single click on the web worker or main button. Notice, a widget appears when using the web worker and the hover css classes can still toggle. This illustrates why we use the web worker. When we click the main button, the UI is locked. -- The tester button is an additional illustration. Click while running main, the component will not appear until after the process is finished.

Article

https://medium.com/@erxk_verduin/improve-performance-with-web-workers-497931fdef1b

You can’t perform that action at this time.