Commit Graph

8 Commits

Author SHA1 Message Date
513e95d697 Don't terminate & recreate workers after each task
After some testing, I'm fairly confident the issue I was seeing before isn't
happening now. After re-processing ~250 plugins a few times with the same
workers I was seeing significant slow-downs with large plugins. Also, if I was
listening to music in the browser it would start crackling and popping.

My hypothesis is that wee_alloc was causing a memory leak in the old version
which was causing browsers to freak out unless I recreated the workers on every
run. Though I'm not sure if that theory holds since I wasn't seeing out of
control memory usage in the dev tools. Perhaps wee_alloc just wasn't good at
managing memory after a certain number of allocate/deallocate cycles and was
putting a huge strain on the browser.

I'm hoping that reusing workers like this will also speed up processing and
possibly resolve some crashing that some users were seeing.
2022-09-26 23:04:48 -04:00
2065b5fa3a Select file and plugin, add to new plugins state 2022-08-17 23:19:55 -04:00
fd7d22e16a Enable processing plugins as soon as there is one available worker 2022-03-19 01:20:24 -04:00
38d3536340 Create workers using new webpack 5 syntax
Drop worker-loader which isn't needed anymore.
2022-03-19 01:15:25 -04:00
6a76bfac33 Render plugin data from static server 2022-03-12 14:00:40 -05:00
1b48c34974 Better default worker count value 2022-03-04 23:56:36 -05:00
5dd061627a Move WorkerPoolContext into WorkerPool.ts 2022-03-04 23:53:36 -05:00
eebae85a65 Implement WorkerPool, use webkitdirectory input
WorkerPool speeds up processing of plugins by using more cores on separate threads. It terminates and recreates a worker after it finishes a task since web assembly seems to slow down a ton when a worker is reused (maybe memory becomes to large / unfragmented, idk).

I switched to the deprecated input tag with webkitdirectory since it is the only way to load a folder under the program files folder. Drag and drop might be another alternative, but I'd rather have a picker.
2022-03-04 23:49:14 -05:00