SceneSwitcher
SceneSwitcher copied to clipboard
Scenes JSON clogged by the scene switcher
Describe the bug
I had an issue where somehow the macroActionConditionSplitterPosition
and macroListMacroEditSplitterPosition
lists in the scenes collections JSON would get filled with a huge amount of pos
variables (making the files several megabytes in size). This would in turn make scene collection switches extremely slow. Emptying those lists restored the usual performance.
To Reproduce Steps to reproduce the behavior: N/A (don't know how this happened)
Expected behavior Those lists don't get filled with infinitely repeated variables
Version information
- OS: Win 10 latest x64
- OBS Version 28.0.1
- Plugin Version 1.18.0
Additional context
I use the --multi
switch and launch multiple instances of OBS at the same time, maybe that's what caused it?
Thanks for reporting the issue! Would you be able to share one of these scene collection files with me? Can you reliably reproduce the issue somehow or did the issue resolve itself?
Ok so i did a few more testing and i noticed a few aspects of this bug:
- It has nothing to do with
--multi
, as it also happens with a single OBS instance - When you switch let's say from collection A to collection B, what happens is the entire content of those lists from collection A is appended to the existing content of collection B. As you can imagine, going back and forth between collections will then cause an exponential growth of data.
An example:
Initial State:
Collection A: "macroActionConditionSplitterPosition":[{"pos":0},{"pos":0}]
Collection B: "macroActionConditionSplitterPosition":[]
Switch to Collection B: "macroActionConditionSplitterPosition":[{"pos":0},{"pos":0}]
Switch back to A: "macroActionConditionSplitterPosition":[{"pos":0},{"pos":0},{"pos":0},{"pos":0}]
Switch back to B: "macroActionConditionSplitterPosition":[{"pos":0},{"pos":0},{"pos":0},{"pos":0},{"pos":0},{"pos":0}]
And so on...
I see .. thank you very much for the hint! :) A version with a fix should be available here in a few minutes:
https://github.com/WarmUpTill/SceneSwitcher/actions/runs/3093591727
The problem was that when settings were loaded the old splitter sizes were not discarded. Each time the scene collection is changed the loading of settings is triggered leading to this problem.
Great! Is the fix also going to sanitize existing JSONs after updating? What may be happening is that people are experiencing terrible performances and have no idea where that's coming from.
EDIT: just tested the new version and yeah the bug is gone, but what data is already present in the lists does not get cleared. I think this should be addressed.
It should get cleared as soon you open, but more importantly close the advanced scene switcher window at least once, as this triggers the values to be written again for the active scene collection.
Yeah i was almost editing my message adding that i found that out. That should be enough for everyone hopefully.