mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-19 11:38:21 -04:00
Use wsaccess library to speed up websocket-client
We use ``websocket-client`` to communicate with chromium-browser. The ``websocket.send()`` method, which we use a lot, needs to do some data encoding before sending it to chromium-browser. ``websocket-client`` tries to use ``wsaccel`` or ``numpy`` (C extensions) first and if they are not available, it runs a python implementation of the data encoding function that is terribly slow as they mention. Here is their code that tries to use ``numpy`` or ``wsaccel`` https://github.com/websocket-client/websocket-client/blob/master/websocket/_abnf.py Here is a latest issue talking about their performance issue: https://github.com/websocket-client/websocket-client/issues/340 We don't use either of them. ``wsaccess`` is tiny and was supported earlier by the library. ``numpy`` is huge and it is supported since 0.47 which is NOT available in pip now (0.46 is available). They say that ``numpy`` is faster but they seem the same to me. I suggest to just use ``wsaccel``. I've seen a small improvement in my test runs.
This commit is contained in:
parent
c934759852
commit
f1331c0b61
1 changed files with 1 additions and 0 deletions
1
setup.py
1
setup.py
|
@ -68,6 +68,7 @@ setuptools.setup(
|
|||
'reppy==0.3.4',
|
||||
'requests',
|
||||
'websocket-client!=0.39.0',
|
||||
'wsaccel',
|
||||
'pillow==3.3.0',
|
||||
'urlcanon>=0.1.dev16',
|
||||
'doublethink>=0.2.0.dev81',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue