Python Forum
Slow websockets server -> client
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slow websockets server -> client
#1
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.
BUT
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 :)

nb:
- 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..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Paramiko Server -- Exception (server): Error reading SSH protocol banner ujlain 3 4,511 Jul-24-2023, 06:52 AM
Last Post: Gribouillis
  Listen TCP and send data to websockets neoboby 3 3,010 Feb-13-2023, 09:47 PM
Last Post: Vadanane
  Asyncio | Websockets - general problem starting the server dreamer 5 3,252 Oct-26-2022, 11:55 AM
Last Post: dreamer
  Client/Server proper finalizing transfer wolfman5874 1 1,454 Jul-04-2022, 07:35 PM
Last Post: wolfman5874
Bug Problem connecting TLS client written in C++ and Twisted server gpropf 0 1,391 Jun-12-2022, 05:57 PM
Last Post: gpropf
  Server/client basic communication ebolisa 0 2,027 Sep-30-2021, 12:22 PM
Last Post: ebolisa
  Client server Multithreading Anan 6 5,864 Apr-21-2021, 08:19 PM
Last Post: SheeppOSU
  websockets help :/ kimblee 3 5,528 Feb-15-2021, 01:26 AM
Last Post: kimblee
Question Trouble with Client/Server reverse Shell! Gilush 0 2,782 Feb-03-2021, 01:04 PM
Last Post: Gilush
  Basic client server code question swisscheese 4 3,240 Dec-12-2020, 08:51 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020