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

Stop interacting with the SD card from the scan core #92

Open
JosephHewitt opened this issue Jul 11, 2023 · 0 comments
Open

Stop interacting with the SD card from the scan core #92

JosephHewitt opened this issue Jul 11, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JosephHewitt
Copy link
Owner

Benchmarks show that each logged WiFi network on side A takes ~21ms for the printf to the file object. The flush afterwards is ~8ms. The times have quite some jitter, but this seems to be about the average.

Worst case I have seen so far is ~40ms to write a single new network then flush. Since the WiFi scan part of the loop is ~1430ms (110ms per channel x 13 channels), we're wasting around 3% of the scan core on flushing out the data -- and that's if only a single new network is found. This slowdown will compound with more new networks found in a single channel scan.

Moving the writing to the other core will definitely see an increase in scan performance, but it may not be able to keep up. This will need very close monitoring after implementing, especially in extremely high WiFi dense areas.

It might be worth creating another xTaskCreatePinnedToCore for write operations which has a higher priority that simply yields when there is nothing to write.

@JosephHewitt JosephHewitt added the enhancement New feature or request label Jul 11, 2023
@JosephHewitt JosephHewitt self-assigned this Jul 11, 2023
@JosephHewitt JosephHewitt added the bug Something isn't working label Jul 12, 2023
@JosephHewitt JosephHewitt changed the title Stop interacting with the SD card from the scan core Slowdown in primary_scan_loop [SIDE A] Jul 12, 2023
@JosephHewitt JosephHewitt removed the bug Something isn't working label Jul 12, 2023
@JosephHewitt JosephHewitt changed the title Slowdown in primary_scan_loop [SIDE A] Stop interacting with the SD card from the scan core Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant