Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenes JSON clogged by the scene switcher #539

Closed
Ithilion opened this issue Sep 18, 2022 · 6 comments · Fixed by #540
Closed

Scenes JSON clogged by the scene switcher #539

Ithilion opened this issue Sep 18, 2022 · 6 comments · Fixed by #540

Comments

@Ithilion
Copy link

Ithilion commented Sep 18, 2022

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?

@WarmUpTill
Copy link
Owner

WarmUpTill commented Sep 19, 2022

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?

@Ithilion
Copy link
Author

Ithilion commented Sep 19, 2022

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...

@WarmUpTill WarmUpTill linked a pull request Sep 20, 2022 that will close this issue
@WarmUpTill
Copy link
Owner

WarmUpTill commented Sep 20, 2022

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.

@Ithilion
Copy link
Author

Ithilion commented Sep 20, 2022

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.

@WarmUpTill
Copy link
Owner

WarmUpTill commented Sep 20, 2022

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.

@Ithilion
Copy link
Author

Yeah i was almost editing my message adding that i found that out. That should be enough for everyone hopefully.

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 a pull request may close this issue.

2 participants