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

performance improvement #3

Open
ryansmccoy opened this issue Mar 24, 2020 · 1 comment
Open

performance improvement #3

ryansmccoy opened this issue Mar 24, 2020 · 1 comment

Comments

@ryansmccoy
Copy link
Owner

  • ZeroMQ - High-Speed Subscribers version:
  • Python version:
  • Operating System:

Description

Appending to List is Slow

https://github.com/ryansmccoy/zmq-high-speed-subs/blob/master/zmq_high_speed_subs/_14_worker.py

            np_array = np.append(np_array, array[0])

Should allocate entire list ahead of time.

@ryansmccoy
Copy link
Owner Author

ryansmccoy commented Mar 26, 2020

Also, iterating over messages. Should probably be apply

` This
message = packed.decode().split(',')

            array = self.process_message(message[1:])

            np_array = np.append(np_array, array[0])

`

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

No branches or pull requests

1 participant