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

S3: Performance issues with wifi initialized #183

Closed
bugadani opened this issue May 24, 2023 · 5 comments
Closed

S3: Performance issues with wifi initialized #183

bugadani opened this issue May 24, 2023 · 5 comments

Comments

@bugadani
Copy link
Contributor

This is a bit of a vague issue because I don't have proper data, just what I can see.

I have a device that polls a sensor at 1ms interval, filters, downsamples the signal, and renders it to an SSD1306 (128x64px monochrome) display. This works well enough by itself.

However, when I add esp-wifi and call esp_wifi::initialize, even if I do anything more with wifi, the signal rendering becomes very choppy, and it also looks like I'm no longer capturing every sample.

@bugadani bugadani changed the title Performance issues with wifi initialized S3: Performance issues with wifi initialized May 24, 2023
@MabezDev
Copy link
Member

I believe this could (partially) by the task switching frequency, for RISC-V we are using 1000hz switching frequency, but on Xtensa we are using 2000hz for some reason (1/ 500us = 1/ 0.0005 = 2000HZ). At 2000 switches a second, I imagine most of the work done by the CPU is the switching code itself :D.

We should make this the same across all chips and also tune the value. I believe 1000 could still be too high but I guess we need to do some profiling to see.

@MabezDev
Copy link
Member

I suppose this is also fixed by #185 now?

@bugadani
Copy link
Contributor Author

bugadani commented May 27, 2023

I'd say the answer is "yesn't". My particular issue is fixed, and wifi initialization can now be indefinitely delayed, which is good. However, the (original) cause of my problems, that wifi initialization creates two looping tasks without anything to do (ignore their scheduling frequency for now), and that those tasks can't be stopped, still stands. How would you like to track this?

@bjoernQ
Copy link
Contributor

bjoernQ commented May 30, 2023

I'd say the answer is "yesn't". My particular issue is fixed, and wifi initialization can now be indefinitely delayed, which is good. However, the (original) cause of my problems, that wifi initialization creates two looping tasks without anything to do (ignore their scheduling frequency for now), and that those tasks can't be stopped, still stands. How would you like to track this?

Should be possible to offer a way to completely de-initialize and tear-down the whole WiFi/BLE functionality. Mind creating a new issue for this enhancement?

@bugadani
Copy link
Contributor Author

Opened esp-rs/esp-hal#1604.
This issue has been resolved by #185

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

3 participants