I am making an image uploader in golang.
I am using req.ParseMulitpartForm at my server, But it is taking too much time.
For 3MB Image, req.ParseMulitpartForm is taking around 2.5 seconds to parse, I want to do it under 100ms.
Well, where is the time being spent? I doubt the Go code itself takes that much time. What is your upload speed? The information and code you have given us so far is not enough.
I have put start time, and end time in the code itself.
You can also this in my code, so 2.5 seconds took this peace of code with 3.8 MB of image exact.
Where are you uploading this? Is it to localhost, or to a server somewhere? If you are not uploading to localhost, try https://speedtest.net and tell us what speeds you are getting.