We are currently facing an issue with slow data return speeds for web requests. The issue arises in a Windows environment, where both the web and server are running on different ports of the same machine, with Flask being used for the server. AJAX requests are sent to the server via the web, and the server responds with JSON data of floating-point numbers, totaling about 35.3MB in size. As observed through the browser, the request takes approximately 1.3 seconds, which seems somewhat slow.
Attempts at resolution include:
- Changing the Content-Type from JSON to text.
- The server-side uses Flask’s ‘compress’ feature for data compression before transmission.
Both methods have shown no significant improvement in the request time.
Is there any way we can increase the speed of data transmission?