6 ms·
Having access to the DOM from all your Web Workers would require much more overhead with synchronization on access, which I think might be an undesirable overhe
by mcpherrinm 16y ago
Having access to the DOM from all your Web Workers would require much more overhead with synchronization on access, which I think might be an undesirable overhead. Threading is hard, and I think this programmer doesn't seem to understand that.
Web Workers are great because they let us break our computation out to something separate from the front end, without incurring the performance penalty of always having the DOM around.
Message passing to a front end that does the drawing is a reasonable design, and I think that this is a correct choice. Of course, if somebody could propose a design where multiple threads have access to the DOM without overhead, then I'd like that along with my unicorn too.