Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Slow websockets server -> client
Hello all, first post here :)
i've been using python for a while - due to my raspberries :) - and lastly i'm having some fun with the websockets module.
i have a web page (served by an apache server, not passing through python..) connecting to the websocket server (here is python).
and well.. it works, i can send and receive information to and from the client.
the strange part arrived when i tried to implement some google charts. I decided to pass the charts' data through the websocket connection (avoiding an ajax connection through the webserver) and, sadly, here is my problem.
The data transfer is DEADLY slow! I mean, let's say the chart data is 50kb of text - it's a json -, it is taking something like 15 seconds to be sent to the client
I found out the mask function could be implemented, and i tried, but i think it's not even used for outgoing data (server -> client)
I tried also to increment the write buffer. no result.
Did i miss something?
Thanks a lot :)

- the server cpu is not stressed during those 15 seconds
- i checked the time is consumed not producing data - which comes from a db -, but sending them
- the connection is in local lan, so it's not a bandwidth issue..

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple udp server/client cardmaker 2 169 Nov-26-2019, 12:36 AM
Last Post: micseydel
  Chat (Client-Server) andresdrr 3 388 Aug-26-2019, 02:01 PM
Last Post: ThomasL
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 418 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  Flask and Websockets == True? rxndy 2 483 Apr-21-2019, 04:08 PM
Last Post: rxndy
  How to combine data taken from server between client and GUI? bescf 9 907 Apr-02-2019, 11:48 AM
Last Post: bescf
  Send Pressure sensor data to IoT platform using WebSockets in Python barry76 3 837 Mar-12-2019, 09:48 AM
Last Post: barry76
  tcp server/client port connection issue valshev 2 2,172 Sep-01-2018, 02:50 PM
Last Post: valshev
  Send data BMP180 between client and server trought module socket smalhao 0 780 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 1,474 Jul-30-2018, 07:52 AM
Last Post: Lyperion
  Need help to make a server/client for DNS Eddie05 1 951 Jun-12-2018, 10:04 AM
Last Post: j.crater

Forum Jump:

Users browsing this thread: 1 Guest(s)