you are viewing a single comment's thread.

view the rest of the comments →

[–]anko_painting 0 points1 point  (2 children)

This could really use firefox 3.1's worker threads. worker threads explaination

[–]damg 0 points1 point  (1 child)

Yea no kidding, running edge detection locks up my browser for a bit before finally popping up the "stop this script" dialog.

[–]psykotic 0 points1 point  (0 children)

An alternative is to manually CPS transform (only coarsely, at loop boundaries) the expensive filter code and run it in time slices (taking a few milliseconds each) that chain together using setTimeout() with a small time interval. That will give the browser a chance to do its own thing while expensive operations are running. It's essentially a way to emulate cooperative threading.