Interesting. I’m gonna have to try this on my ili9341 displays! They spam the logs with these exact messages.
EDIT: Never mind. My display uses SPI, not i2c. And it’s already set for 80mhz.
Looks like the devs have come up with a fix for this VERY annoying “feature”…
dev
← numo68:core/warn-only-on-longer-blocking
opened 08:38PM - 10 Jan 25 UTC
# What does this implement/fix?
Some time ago the ESPHome code was changed so… that every time the component blocks for more than 50ms, a warning is output. The rationale was that one should not have to bump the warning level to debug, as it slows the device too much.
Unfortunately sometimes one has a device that works that way, but wants to develop something else. The warnings from this code are then buried inside the component blocking ones.
This PR changes the behavior of `Component` and `WarnIfComponentBlockingGuard` so that a warning is only output if the time the component has blocked is more than 10ms above when the last warning was output. This still gives the information needed, but does not produce that much output.
In case the component developer wants to reset the limit - for example because some operation is knowingly long - the `warn_if_blocking_over_` member can be simply reset.
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Code quality improvements to existing code or addition of tests
- [x] Other
**Related issue or feature (if applicable):**
- relates to [https://github.com/esphome/issues/issues/4717]
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):**
N/A
## Test Environment
- [ ] ESP32
- [x] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
## Example entry for `config.yaml`:
N/A
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
1 Like