Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large list of dicts transmit inefficiently as netref #539

Closed
artemtyupov opened this issue Jun 27, 2023 · 2 comments
Closed

Large list of dicts transmit inefficiently as netref #539

artemtyupov opened this issue Jun 27, 2023 · 2 comments
Assignees
Labels
Done The issue discussion is exhausted and is closed w/ comment Question Issue is a result of unclear documentation or lack of documentation

Comments

@artemtyupov
Copy link

I have list of dictionaries 150000 size.
looping through this netref list on client side very slow.
with using multiprocessing.Pool() performance is better, but very slow too:

  • without netref time is 25 seconds (with come logic in loop)
  • with netref time is 271 seconds (wth same logic in loop)

What can be done to increase speed?

@comrumino
Copy link
Collaborator

This is a little tricky because there are a few approaches. The most performant choice would be to transfer the dictionaries as a brine-able type (e.g. json.dumps the whole list to string and send that). The most likely problem is that you have to construct a large number of netrefs and intrinsically send stuff many times. Without knowing your design requirements, it is not easy to propose the best solution for you.

I could see if there is an "easy" win in optimizing the protocol—things that could be cached better. However, having an example to mock types and any nesting of objects you are doing would be helpful.

@comrumino comrumino added Question Issue is a result of unclear documentation or lack of documentation To Start Description reviewed and a maintainer needs "to start" triage labels Jun 27, 2023
@comrumino comrumino self-assigned this Jun 27, 2023
@artemtyupov
Copy link
Author

Thank you for answer.
Im resolve the problem with use copy.deepcopy on client side.
Timing of this - 2 seconds, and then loop over default list of dicts)

@comrumino comrumino added Done The issue discussion is exhausted and is closed w/ comment and removed To Start Description reviewed and a maintainer needs "to start" triage labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done The issue discussion is exhausted and is closed w/ comment Question Issue is a result of unclear documentation or lack of documentation
Projects
None yet
Development

No branches or pull requests

2 participants