browser icon indicating copy to clipboard operation
browser copied to clipboard

Need Suggestion : CPU is reaching high at 50-60 tps

Open iRipulChhabra opened this issue 9 months ago • 7 comments

Hi @dineshgowda24

Thanks for creating this library. Just need your suggestion on the CPU usage. I am seeing very high CPU (~ 80% ) while I am on 50 TPS load test. If I remove the browser detection code. Its come to 10-15%. Did you test the lib against heavy traffic and experience anything like this?

FYI, I am using a 4 VCPU and 16G RAM machine to perform the test.

Example code which I use it for each http request to detect browser from UA.

b, err := browser.NewBrowser(ua)
if err != nil {
	return "unknown"
}
return b.Name()
}

iRipulChhabra avatar Feb 21 '25 07:02 iRipulChhabra