Repository navigation
Conversation
Collaborator
|
I assume you'll perform the suggested tests on your adapter, correct? |
Collaborator
Author
|
yes, doing that now |
Keep duplicate keys in sync with retained entries and remove only evicted DOM rows. Cover long-running retention, filtering and restart markers.
Throttle heap and socket sampling independently of notification frequency, collect expensive data outside critical sections, and report uptime in seconds. Test sampling and reporting deadlines.
Bound IDs and string lengths, synchronize access, and retain existing IDs at capacity. Cover exhaustion and concurrent access.
Share bounded chunk buffering across streaming endpoints, return send errors without retrying, and shorten socket waits. Finish drift JSON before terminating its response. Test payload preservation, failed sends and valid response termination.
guido4096
force-pushed
the
fix/runtime-performance
branch
from
October 31, 2026 18:40
aa4baa2 to
50a798d
Compare
Owner
|
Please split into separate PRs. |
This was referenced Oct 31, 2026
Collaborator
Author
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by five single-commit PRs
Split at the maintainer's request. The replacement PRs each target master directly and contain one original commit:
Each replacement has its own scope, standalone host-test results and remaining validation notes. The five extracted patches reconstruct this PR's exact tracked file tree. Suggested merge order: host-test mocks first, then the remaining fixes independently.
This combined PR is closed in favor of the five linked replacements.
Original combined description (historical)
I noticed the adapter was becoming less responsive over time. This PR addresses four concrete sources of growing or unnecessary work: retained browser log keys, diagnostics triggered by every notification, string-pool overflow/concurrent access, and repeated HTTP sends after a socket failure.
The changes are split into five commits so each fix can be reviewed independently.
Commits
1.
706fcef— Correct host-test mocksUse the host's real
statdefinition and filesystem behavior for persistence tests, rather than a fabricated structure and an always-failing stub. Move C++ standard headers outside the FreeRTOS mock'sextern "C"block.This is test infrastructure only. It makes persistence checks trustworthy and prevents include-order-dependent compilation problems; it does not change ESP firmware behavior.
2.
c8e7374— Keep the Logs page boundedThe duplicate-key set previously retained keys after their log entries were evicted. At the retention limit, the page also rebuilt its entire log display repeatedly.
Keep duplicate keys aligned with retained entries and remove evicted DOM rows incrementally. Regression coverage exercises prolonged retention, filtering, clearing and restart markers.
3.
622b335— Limit diagnostics to their intended scheduleBus/log notifications woke the monitor and triggered expensive heap/socket inspection, even before its nominal 30-second interval elapsed. Counting these wakes also made the “hourly” heap trend run too often.
Use monotonic deadlines: health every 30 seconds, summaries every five minutes, and trend samples initially and then hourly. Collect heap and socket information outside the critical section and correct
uptime_secondsto use seconds. Tests verify that frequent notifications cannot accelerate sampling.4.
2a0558d— Protect string-pool IDs and concurrent accessThe 8-bit entry counter could wrap when adding a 256th string, invalidating existing IDs. Concurrent insertions were also unsynchronized.
Limit the pool to 255 addressable entries, reject names longer than its length representation, and synchronize insertion/lookup. Existing strings remain accessible when either entry or byte capacity is exhausted. Tests cover both limits, oversized names and concurrent interning.
5.
aa4baa2— Stop failed HTTP streams promptlyStreaming endpoints previously sent many small fragments and continued attempting writes after a send failure, potentially repeating socket waits.
Add a shared 1024-byte chunk buffer, stop socket output after the first error, and return that error to the HTTP server. Apply it to streaming endpoints and finish configuration-drift JSON before terminating the response. Reduce send/receive waits from 10/10 seconds to 3/5 seconds. Tests check preserved payloads, response termination and failure propagation without repeated sends.
Validation completed
Hardware checks before marking ready
Please record firmware revision, hardware type, test duration and any observed resets or memory/latency trends. The main hardware review points are the shorter HTTP timeouts, the additional HTTP buffer's stack use, and synchronization of the shared string pool.