Skip to content

Conversation

@tkountis
Copy link
Contributor

@tkountis tkountis commented Jul 3, 2019

  • Replaced BUFFER_SIZE import with a local variable which respects the configuration (if exists)
  • Removed the timeout of the asyncore loop to allow for the thread to finish faster, allowing other threads to make progress sooner
  • Replaced the double list iteration on the Input#read_byte_array with a bytearray, similar to what was done here let the python handle the loop while reading a byte array #174 but this version doesn't wrap the result, rather leaves it as pure bytearray which is slightly concerning because it changes the type of the function, but it gives a good bit of extra boost.

@tkountis tkountis added this to the 3.12.1 milestone Jul 3, 2019
@tkountis tkountis requested a review from mdumandag July 3, 2019 14:06
@tkountis tkountis self-assigned this Jul 3, 2019
@tkountis tkountis force-pushed the perf/minor_enhancments_for_latency branch from cb9e322 to 9c3e734 Compare July 3, 2019 14:44
@tkountis tkountis force-pushed the perf/minor_enhancments_for_latency branch from 9c3e734 to 223043b Compare July 4, 2019 09:50
@tkountis tkountis requested a review from mdumandag July 4, 2019 09:50
@asimarslan asimarslan self-requested a review July 4, 2019 10:08
self.a_float = inp.read_float()
self.a_double = inp.read_double()

self.bytes_ = inp.read_byte_array()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment: these test changes should not be required anymore and maybe you can add an extra field to test the behaviour when the return value is bytearray

@tkountis tkountis force-pushed the perf/minor_enhancments_for_latency branch from 223043b to b07b94c Compare July 4, 2019 14:00
@tkountis tkountis requested a review from mdumandag July 4, 2019 14:01

SERIALIZATION_INPUT_RETURNS_BYTEARRAY = ClientProperty("hazelcast.serialization.input.returns.bytearray", False)
"""
Input#read_byte_array returns a List if property is True, otherwise it will return a byte-array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List if property is True -> List if property is False
Changing this to False -> Changing this to True

@tkountis tkountis force-pushed the perf/minor_enhancments_for_latency branch from b07b94c to f324c61 Compare July 5, 2019 09:37
@tkountis tkountis merged commit b929054 into master Jul 5, 2019
@mdumandag mdumandag deleted the perf/minor_enhancments_for_latency branch July 8, 2019 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants