mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
Pre-populate decompressed rule cach (#24799)
This commit is contained in:
+3
-3
@@ -13,8 +13,8 @@ All notable changes to this project will be documented in this file.
|
||||
- Berry manual tool to compare and verify solidification between C and Python (#24754)
|
||||
- ESP32 VID6608 hardware RMT support for Automotive gauge driver (#24759)
|
||||
- Support for uDisplay ST7305 (#24738)
|
||||
- Support for hosted MCU different from esp32c6
|
||||
- Trigger events to Berry when `USE_RULES` is not enabled
|
||||
- Support for hosted MCU other than esp32c6
|
||||
- Trigger events to Berry when `USE_RULES` is not enabled (#24796)
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
@@ -30,7 +30,7 @@ All notable changes to this project will be documented in this file.
|
||||
- NeoPool possible overflow/div-zero errors and Hydrolysis module detection (#24724)
|
||||
- Seesaw encoder position tracking in light control mode (#24730)
|
||||
- I80 pushColors swap logic for parallel displays (#24766)
|
||||
- Crash when MQTT-TLS when tcp connection failed
|
||||
- Crash when MQTT-TLS when tcp connection failed (#24798)
|
||||
|
||||
### Removed
|
||||
- `USE_UNIVERSAL_TOUCH` no more forced when `USE_UNIVERSAL_DISPLAY` is enabled (#24743)
|
||||
|
||||
+3
-1
@@ -121,7 +121,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
- Support for multi-byte chars like emojis (💡) in light device toggle buttons [#24482](https://github.com/arendst/Tasmota/issues/24482)
|
||||
- Support for M5Stack Atom S3R drivers [#24747](https://github.com/arendst/Tasmota/issues/24747)
|
||||
- Support for uDisplay ST7305 [#24738](https://github.com/arendst/Tasmota/issues/24738)
|
||||
- Support for hosted MCU different from esp32c6
|
||||
- Support for hosted MCU other than esp32c6
|
||||
- Trigger events to Berry when `USE_RULES` is not enabled [#24796](https://github.com/arendst/Tasmota/issues/24796)
|
||||
- MiElHVAC extend support of AirDirection control [#24675](https://github.com/arendst/Tasmota/issues/24675)
|
||||
- ESP32 VID6608 hardware RMT support for Automotive gauge driver [#24759](https://github.com/arendst/Tasmota/issues/24759)
|
||||
- Berry add support for pre-processor [#24679](https://github.com/arendst/Tasmota/issues/24679)
|
||||
@@ -140,6 +141,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
- LVGL splash screen uses default Montserrat-14 instead of Montserrat-20 on small screens [#24735](https://github.com/arendst/Tasmota/issues/24735)
|
||||
|
||||
### Fixed
|
||||
- Crash when MQTT-TLS when tcp connection failed [#24798](https://github.com/arendst/Tasmota/issues/24798)
|
||||
- I80 pushColors swap logic for parallel displays [#24766](https://github.com/arendst/Tasmota/issues/24766)
|
||||
- NeoPool possible overflow/div-zero errors and Hydrolysis module detection [#24724](https://github.com/arendst/Tasmota/issues/24724)
|
||||
- Seesaw encoder position tracking in light control mode [#24730](https://github.com/arendst/Tasmota/issues/24730)
|
||||
|
||||
@@ -304,7 +304,7 @@ String GetRule(uint32_t idx) {
|
||||
// If the cache is empty, we need to decompress from Settings
|
||||
if (0 == k_rules[idx].length() ) {
|
||||
GetRule_decompress(rule, &Settings->rules[idx][1]);
|
||||
if (!Settings->flag4.compress_rules_cpu) {
|
||||
if (!Settings->flag4.compress_rules_cpu) { // SetOption93 - (Compress) Keep uncompressed rules in memory to avoid CPU load of uncompressing at each tick (1)
|
||||
k_rules[idx] = rule; // keep a copy for next time
|
||||
}
|
||||
} else {
|
||||
@@ -934,8 +934,7 @@ bool RulesProcess(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void RulesInit(void)
|
||||
{
|
||||
void RulesInit(void) {
|
||||
// indicates scripter not enabled
|
||||
bitWrite(Settings->rule_once, 7, 0);
|
||||
// and indicates scripter do not use compress
|
||||
@@ -947,6 +946,16 @@ void RulesInit(void)
|
||||
bitWrite(Settings->rule_enabled, i, 0);
|
||||
bitWrite(Settings->rule_once, i, 0);
|
||||
}
|
||||
#ifdef USE_UNISHOX_COMPRESSION
|
||||
else {
|
||||
// Pre-populate k_rules[] cache here (FUNC_PRE_INIT), before WiFi/MQTT/WebServer
|
||||
// allocate heap, so the persistent cache lands at low heap addresses instead of
|
||||
// fragmenting the middle of the heap when first rule evaluation occurs later.
|
||||
if (!Settings->flag4.compress_rules_cpu) { // SetOption93 - (Compress) Keep uncompressed rules in memory to avoid CPU load of uncompressing at each tick (1)
|
||||
GetRule(i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Rules.teleperiod = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user