Giter VIP home page Giter VIP logo

Comments (5)

gokhanoner avatar gokhanoner commented on May 27, 2024

I believe the issue is this method since it loops through whole byte array: https://github.com/hazelcast/hazelcast-python-client/blob/master/hazelcast/serialization/input.py#L84

from hazelcast-python-client.

burakcelebi avatar burakcelebi commented on May 27, 2024

Nice catch @gokhanoner!

@mdumandag could you please take a look at this when you are available? Thanks!

from hazelcast-python-client.

mdumandag avatar mdumandag commented on May 27, 2024

Thanks for the report. I will be working on that soon

from hazelcast-python-client.

burakcelebi avatar burakcelebi commented on May 27, 2024

Moving to 4.0. Learned that this can be solved easily with 4.0 changes.

from hazelcast-python-client.

mdumandag avatar mdumandag commented on May 27, 2024

This issue is fixed for the current master. The problematic for loop is replaced with the standard library implementation so the results are on par with Java right now. We cannot do the same thing for backward compatibility reasons for the 3.12.z branch, so I am closing this issue now.

The test durations are like below on my laptop.

Java - with byte[] - 80ms

Map Size = 10000
2020-10-15T13:29:36.389Z
Entries Iterated = 10000
2020-10-15T13:29:36.462Z
10765799481275

Python with byte[] - 150ms

--------------------------------------

USING SYNC...
map size: 10000
WITH ITERATOR...
2020-10-15 16:38:23.268612 start
2020-10-15 16:38:23.434704 stop
list length: 10000

WITHOUT ITERATOR...
2020-10-15 16:38:23.434737 start
2020-10-15 16:38:23.594758 stop
list length: 10000

--------------------------------------

USING ASYNC...
map size: 10000
WITH ITERATOR...
2020-10-15 16:38:23.598606 start
2020-10-15 16:38:23.751234 stop
list length: 10000

WITHOUT ITERATOR...
2020-10-15 16:38:23.751268 start
2020-10-15 16:38:23.903048 stop
list length: 10000

Java - with String - 150ms

Map Size = 10000
2020-10-15T13:40:09.295Z
Entries Iterated = 10000
2020-10-15T13:40:09.440Z
-217038305000

Python - with String - 200ms

--------------------------------------

USING SYNC...
map size: 10000
WITH ITERATOR...
2020-10-15 16:40:37.001457 start
2020-10-15 16:40:37.209843 stop
list length: 10000

WITHOUT ITERATOR...
2020-10-15 16:40:37.209875 start
2020-10-15 16:40:37.414970 stop
list length: 10000

--------------------------------------

USING ASYNC...
map size: 10000
WITH ITERATOR...
2020-10-15 16:40:37.420307 start
2020-10-15 16:40:37.607766 stop
list length: 10000

WITHOUT ITERATOR...
2020-10-15 16:40:37.607794 start
2020-10-15 16:40:37.803686 stop
list length: 10000

from hazelcast-python-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.