Closed ChristianRich closed 8 years ago
This is how I handled it as well. I have a slave process that handles resizing and uploading images
@thedewpoint Have you got any code you'd like to share?
@ChristianRich sure I created a gist. its not pretty but it gets the job done
https://gist.github.com/thedewpoint/ff143e0fc780b251b0281a866b008bdc
Awesome. Thanks @thedewpoint
lwip does image operations on worker threads, so in that sense it's non blocking. If you want a separate process, you'd have to fork a child.
Generally speaking image processing is CPU intensive, so I was wondering if anyone has tried lwip running as a child process? This should be pretty straight forward I reckon?
While users are uploading images to my site and lwip is doing work, I don't want the main thread to lag causing my web server to slow down.
Is this a valid concern at all?