Skip to content

Conversation

@w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Dec 18, 2023

  • only rewrite ui-config on load when there is change

ui-config.json is is always rewritten on webui load, even when there's no change
there's no point and can cause file corruption if webui is killed at a inappropriate time during load

and yes I was unlucky enough that this actually happened to me

Changes

  • create a copy of the dictionary read from file and compare before writing if there is no change then don't write the file
  • a minor typo fix

Checklist:

@w-e-w w-e-w requested a review from AUTOMATIC1111 as a code owner December 18, 2023 06:36
@AUTOMATIC1111 AUTOMATIC1111 merged commit 0ce67cb into dev Jan 1, 2024
@AUTOMATIC1111 AUTOMATIC1111 deleted the reduce-unnecessary-ui-config-write branch January 1, 2024 13:35
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
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.

3 participants