开发者

web application background process threading

开发者 https://www.devze.com 2023-04-01 06:51 出处:网络
I have a web application and a particular function that processes CSV files with a lot of calculations being done and is really CPU intensive, the issue with this is that it utilizes 100% of CPU and c

I have a web application and a particular function that processes CSV files with a lot of calculations being done and is really CPU intensive, the issue with this is that it utilizes 100% of CPU and causes errors when other users are on the application because it is monopolizing the CPU

I tested passing the processing off to a lower priority thread to see if that improves performance and it seems to work, but this particular function needs to update the Web UI.

What is the best method to run this function as a lower priority thread but also be able to update the UI, or make sure I don't monopolize the CPU?

I can go the route of processing the data offline, and send开发者_如何学Pythoning the user an email, but I wanted to see if there is a way to accomplish this without going down that route

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号