eogas / evsonic

A ripoff of subsonic in nodejs with express
zlib License
2 stars 1 forks source link

Break out mediadir traversal into a separate process #5

Open eogas opened 10 years ago

eogas commented 10 years ago

At the moment, when adding a significantly large media dir, the burden of processing the full directory structure slows down web requests. Since node is single-threaded, and it doesn't provide any built-in way to prioritize asynchronous tasks, the easiest solution to this issue may simply be to break out the traversal into a separate process.

It should still be possible to launch, and possibly manage this subprocess from the main evsonic application. Also, it should be possible for the traversal process to live along side the main app.js, and reference the same settings, models, and so forth.