workerman icon indicating copy to clipboard operation
workerman copied to clipboard

runtime test

Open stafred opened this issue 4 months ago • 2 comments

Hello. I am using your project for my own purposes, but I encountered the following problem. Why is there such a big time difference between requests (the code is the same)? How to fix it? (Windows OS) изображение изображение

stafred avatar Mar 04 '24 17:03 stafred

I cannot tell you the exact reason. It is generally caused by business logic, and you need to troubleshoot it yourself. The troubleshooting method is to find suspicious code snippets, record the execution time of the code snippets, and continue until you find the key code. In addition, the first request after the process starts may be slightly slower because it needs to load the code from the disk into memory and initialize the database connection.

walkor avatar Mar 07 '24 02:03 walkor

May another reason is multiple worker processes. First connection to a worker that have hot code or data loaded, but next request to another worker is not.

xpader avatar Mar 07 '24 11:03 xpader