Skip to content

Conversation

@dbieber
Copy link
Owner

@dbieber dbieber commented Apr 14, 2025

Summary

  • Only send changed settings from the client to the server
  • Add client-side comparison to determine which values have actually changed
  • Keep the server-side code simple by processing whatever it receives

Test plan

  • Save settings without changing WiFi networks and verify that WIFI_NETWORKS isn't included in the request payload
  • Save settings with changed WiFi networks and verify WIFI_NETWORKS is included in the request payload
  • Verify other unchanged settings are not included in request payload

When I click save in the settings UI, the raspberry pi freezes up for several seconds; one hypothesis I had is that its the call to reconfigure_wifi that causes things to hang. lets test this hypothesis by skipping saving any unchanged settings (thereby skipping reconfigure_wifi if the wifi list hasn't changed) so we can see if the hanging happens when I don't change the wifi list and just change a different setting; also, if you have other theories as to what's causing the hanging, let me know

🤖 Generated with Claude Code

dbieber and others added 3 commits April 14, 2025 18:43
- Compare WiFi networks before running reconfigure_wifi
- Skip saving other settings that haven't changed
- Add diagnostic logs to track when settings are changed

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Compare each setting with its original value in the client
- Only include changed settings in the request payload
- Keep server-side processing unchanged

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
@dbieber dbieber changed the title Optimize settings save by skipping unchanged values Optimize settings save by only sending changed values from the client Apr 14, 2025
@dbieber dbieber merged commit 338d14e into main Apr 14, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants