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

Use newer version of digi-xbee to fix performance issue #1

Closed
aidanbh opened this issue Feb 27, 2019 · 1 comment
Closed

Use newer version of digi-xbee to fix performance issue #1

aidanbh opened this issue Feb 27, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aidanbh
Copy link
Owner

aidanbh commented Feb 27, 2019

The digi-xbee library on pip was last released April 2018. This code leaks StreamHandlers which results in logging messages being duplicated. I believe this is the source of an issue which causes CPU usage to massively spike when a lot of packets are queued for transmit, creating a large interval between bursts of serial Tx/Rx during which the screens is filled with logged byte messages. A few weeks ago, digidotcom/xbee-python#57 was discussed at digi upstream which revealed that a patch (digidotcom/xbee-python@dad8aae) came out in August that fixed this, but one one ever uploaded to pip. So we'll need to pull from git.

When I get home today I'll update the Pipfile and test it out.

Since it is already quite wasteful to log every packet sent/recd (doubling xfer times, bc TUN and stdout together are just two file descriptors instead of one), I'm going to go ahead and turn it off entirely. It would be nice if they had a way to disable their logs while still letting me use whatever log levels I want in my code, but their response (digidotcom/xbee-python#61) was to call logging.disable(). I'll dig around and see if there's another way.

@aidanbh aidanbh added the bug Something isn't working label Feb 27, 2019
@aidanbh aidanbh self-assigned this Feb 27, 2019
@aidanbh
Copy link
Owner Author

aidanbh commented Feb 27, 2019

Closed by 5065ef8. Also fixes a different leak in the library patched right after!

@aidanbh aidanbh closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant