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

Add auto player duck on mic live. Closes #70 #177

Merged
merged 9 commits into from
Jan 24, 2021

Conversation

mstratford
Copy link
Member

Some people may not want to keep fading their bed/music down to talk. This adds a Pro-Mode ™️ toggle button to enable WebStudio to work the faders for you.

This does show a tad of performance issue drawing to the screen though, those tweens are drawing too often.

@markspolakovs
Copy link
Member

@mstratford could you rebase this?

@mstratford
Copy link
Member Author

@mstratford could you rebase this?

Done :)

@markspolakovs
Copy link
Member

Thanks, will test and merge in tonight.

@markspolakovs
Copy link
Member

markspolakovs commented Nov 2, 2020

So, it works, but I have noticed quite a few perf problems when using it (which I oddly don't notice when fading using the usual shortcuts).

I dug into the React profiler and this is what I saw:

image

Couple things stand out to me:

  • I faded down and up once, and it triggered 245 renders
  • This bit here takes 2.2ms to render, and seems to render unnecessarily
    image
  • In general, items seem to render unnecessarily (Ed: fixed in Reduce Item renders #182)
    image

@mstratford
Copy link
Member Author

I know there's certainly something inefficient, I can sometimes get WebStudio to make my laptop to become a blow drier (sustained like 50% cpu while seemingly doing nothing).

@mstratford
Copy link
Member Author

I think the major problem here is that between.js has no step limiting, it just goes as often and as quickly as it can. Same with the VU meters. This just means the CPU is as busy as it can be, which i'm not too much of a fan of.

@markspolakovs
Copy link
Member

@mstratford... ugh, that's annoying. Am I going to have to write my own between clone that uses requestAnimationFrame?

@markspolakovs
Copy link
Member

Okay, no, it does use rAF under the hood. Am I going to write my own clone that limits it to, say, an update every 50 or 100ms

@markspolakovs
Copy link
Member

The VU meters I could probably refactor to not re-render the element each frame, which would save a few CPU cycles, although since it doesn't rerender anything above it I'm not sure how much it'd save.

Either way, I'll probably do those in separate PRs, so this and they can go in for 1.4.1 / 1.5.0.

@mstratford
Copy link
Member Author

So i've updated the VUmetering stuff a bit in #186 to fix some rendering bugs. In #191 i've also rejigged the UI to not re-render the entire page on a show plan update, as well as limiting the VU meters to 30FPS to hopefully reduce stuttering on low end devices. Also looks a bit less frantic too.

@mstratford
Copy link
Member Author

mstratford commented Jan 24, 2021

Current known bugs:

  • PFL and Auto Duck interfere with fading eachother.
  • Still the update rate of the whole UI plummets when fading.

So that autoduck knows when it's not supposed to meddle.
@mstratford
Copy link
Member Author

mstratford commented Jan 24, 2021

Kinda want to merge this now, get people to test it. Leave the optimisation to #193

@mstratford
Copy link
Member Author

Taking some liberties and merging this to dev now. :)

@mstratford mstratford merged commit ed8e275 into master Jan 24, 2021
@mstratford mstratford deleted the mstratford-duck-when-honking branch January 24, 2021 20:28
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