Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Sep 11, 2024
1 parent 127ef72 commit 43f8d7e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ picows Release History
:depth: 1
:local:

1.2.1 (2024-09-11)
------------------

* Optimization: Internal memory buffers were calling PyMem_Realloc too often

1.2.0 (2024-09-05)
------------------
Expand Down
2 changes: 1 addition & 1 deletion picows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
'PICOWS_DEBUG_LL'
]

__version__ = "1.2.0"
__version__ = "1.2.1"
__author__ = "Taras Kozlov"
10 changes: 7 additions & 3 deletions picows/picows.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,15 @@ cdef class WSProtocol:
self._process_new_data()

# Benchmark and profiler showed that buffered protocol is actually slower
# then normal. There are additional costs of 2 python calls
# than normal. There are additional costs of 2 python calls
# (get_buffer, buffer_updated) comparing to a single data_received.
# Also extra costs are related to creating memoryview and getting buffer
# out of it

# out of it.
#
# Uncommenting the following code will make uvloop to think that WSProtocol
# implements BufferedProtocol. uvloop will use get_buffer/buffer_updated
# instead of data_received.
#
# def get_buffer(self, Py_ssize_t size_hint):
# cdef Py_ssize_t sz = size_hint + 1024
# if self._buffer.size - self._f_new_data_start_pos < sz:
Expand Down

0 comments on commit 43f8d7e

Please sign in to comment.