45
edits
Changes
→Dedicated Worker
[https://vitokhangnguyen.github.io/WebWorkerDemo/index.html https://vitokhangnguyen.github.io/WebWorkerDemo/index.html]
In the demo, we take a [https://github.com/vitokhangnguyen/WebWorkerDemo/blob/main/wallpaper.jpg 6K image ] and apply a Sobel filter. This filter is used to emphasize the edges within an image. It is often used in image processing and computer vision. When we ran the serial code, we noticed the UI lagged (when scrolling) and the cursor remained in the pointer state throughout the entire filtering process, delaying the user from interacting with the user interface. We took an extensive look into this lagging using the performance tool in Firefox. We discovered that the DOM clicking event occurred throughout the entire duration of the function execution (8 seconds for my PC) and the FPS even dropped down to a low of 0.38, as shown in the image below.
INSERT PROFILER IMAGE HERE