Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Loading a model with GLTFLoader through Web Worker causes mesh deformation on SkinnedMesh

My page is taking a long time to load because of the loading of the models that I do as soon as the page loads During loading in the main thread, page interactions, such as hover effects, etc., stop ...
joveem's user avatar
  • 1
0 votes
0 answers
61 views

Web worker inside react component causing race condition

I am trying to create a performant timer component in React.js (for learning purposes) and for that I am using web workers. The logic works as expected the first time when I click "Start" ...
Abhinay's user avatar
  • 21
0 votes
0 answers
143 views

Web Worker Thread Pool

I have developed a Javascript Excel Add-in that uses a Web Worker to make background / long-running service API requests. The user determines how many requests need to be made, and the results are ...
Andrew Tyson's user avatar
1 vote
1 answer
640 views

Image pixel manipulation in a dedicated web worker

I need to do a computation intensive image pixel manipulation in a browser using JavaScript. Pixel manipulation includes histogram equalization, converting to grayscale using lightness (L* of CIE Lab ...
Eugene Khyst's user avatar
  • 10.3k
4 votes
0 answers
184 views

Performance `comlink`, `workercom`, `@fcanvas/communicate`

I was looking for an easier way to work with WebWorker i found 3 npm packages that worked for my case: comlink: https://www.npmjs.com/package/comlink workercom: https://www.npmjs.com/package/...
byn's user avatar
  • 41
1 vote
1 answer
117 views

Javascript Worker Performance without onMessage

I have observed an odd behavior of web workers. Assume worker.js to containt the code below onmessage = function(event) { var x = event.data; var c = 0; for(var i = 0; i < x; i++) c = c + ...
resle's user avatar
  • 2,384
4 votes
0 answers
993 views

Is there a way to JSON.parse without blocking the main thread?

Is there an async way to JSON.parse without blocking the main thread? I am receiving chunks of compressed JSON in an array that are really large, and currently it is blocking the main thread for ~5-6 ...
user17443811's user avatar
0 votes
1 answer
725 views

Does it cause a memory leak for a WebWorker to postMessage to CPU intensive tasks?

Let's say I had a WebWorker file called ticker.js that consisted of this: function tick() { postMessage(1); } setInterval(tick, 1); And then in the main JavaScript program I had this: let ready = ...
Ryan Peschel's user avatar
  • 11.9k
2 votes
2 answers
1k views

How to prevent Javascript from suspending when the user tabs out?

I'm developing a web game which uses a fixed physics timestep. Currently I am doing all my physics and rendering in a requestAnimationFrame function. This works perfectly, but requestAnimationFrame ...
Ryan Peschel's user avatar
  • 11.9k
3 votes
2 answers
837 views

canvas RGBA to RGB conversion

I have RGBA image from canvas and I use typedArray to remove alpha channel. // data - arr from canvas. // [1,2,3,255, 1,2,3,255, 1,2,3,255,] // R G B A R G B A R G B A const delta = 4; ...
Alexufo's user avatar
  • 1,803
3 votes
1 answer
183 views

How to have a processor intensive function update every tick of the metronome and draw to canvas using web workers?

I have a cellular automaton which we can abbreviate like this: // pretend slow update function called every tick of the metronome const update = () => { let i = 0 while (i < 10000) { ...
Lance Pollard's user avatar
4 votes
1 answer
2k views

Efficient dynamic import of multiple scripts in module type Web Worker

I have a web app that needs to dynamically load multiple scripts on startup. For efficiency, it needs to request all the scripts over the network in parallel. For correctness the scripts must execute ...
AshleysBrain's user avatar
  • 22.7k
2 votes
0 answers
89 views

WebWorkers with angular 2+ [closed]

I have few questions regarding web-workers in context with angular, so basically I am working on webapp(dashboard) that having few widgets(table [ag-grid-enterprise], charts [e-charts], data-cards [...
Monis's user avatar
  • 175
0 votes
0 answers
347 views

How to use web workers for parallel processing without messing with browser caching?

My web workers (service workers) are running great. Super fast, parallel processing. The only problem is that inclusion of the service worker means the browser cache for the main index.html page is ...
pythonjsgeo's user avatar
  • 5,411
1 vote
1 answer
563 views

Web workers - firefox vs. chromium (Chrome and MS Edge)

I'am developping a fractal explorer in browser still in beta. The general idea is to offer a navigation as fluid as possible. I use of course a pool of web workers and split each image in n chunks ...
Raphaël Lefevre's user avatar

15 30 50 per page