Skip to content

web: Fixed missing log messages when in futures, or using log crate #9824

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

Merged
merged 4 commits into from
Mar 5, 2023

Conversation

Dinnerbone
Copy link
Contributor

No description provided.

@torokati44
Copy link
Member

Do you think this is also why I wasn't seeing tracing log messages in the console from Buffer::play in #9671?

@Dinnerbone
Copy link
Contributor Author

Do you think this is also why I wasn't seeing tracing log messages in the console from Buffer::play in #9671?

It makes sense! There might be other areas we're entering into Ruffle which isn't wrapped, but I think this was it from what I saw

@Toad06
Copy link
Member

Toad06 commented Mar 3, 2023

Not specifically related to this PR, but I would like to mention that since #9026 it is possible to experience serious slowdowns in Firefox when a file logs a lot of messages into the browser's console - even if the user never opens the console (which is the difference with the previous behavior).

The issue is particularly noticeable in Critical Zone:

  • Using the web extension, open the parameters page and set "log level" to "info".
  • Browse to https://www.ferryhalim.com/orisinal/g2/criticalzone.htm without the console open (the server if often down, so I'm also attaching the game here).
  • Play the game. After only some seconds, you should notice the issue.

So I was wondering if there is anything we can do on our end to prevent that or if this is just an issue related to Firefox (as Chrome doesn't seem affected).

@Dinnerbone
Copy link
Contributor Author

Not specifically related to this PR, but I would like to mention that since #9026 it is possible to experience serious slowdowns in Firefox when a file logs a lot of messages into the browser's console - even if the user never opens the console (which is the difference with the previous behavior).

The issue is particularly noticeable in Critical Zone:

* Using the web extension, open the parameters page and set "log level" to "info".

* Browse to https://www.ferryhalim.com/orisinal/g2/criticalzone.htm without the console open (the server if often down, so I'm also attaching the game [here](https://github.com/ruffle-rs/ruffle/files/10883046/critical_zone.zip)).

* Play the game. After only some seconds, you should notice the issue.

So I was wondering if there is anything we can do on our end to prevent that or if this is just an issue related to Firefox (as Chrome doesn't seem affected).

Can you try the latest commit and see if it helps for you? It seems to for me but I don't want to rule out it being a fluke of me testing

@Toad06
Copy link
Member

Toad06 commented Mar 3, 2023

Yes, I confirm there's no more slowdown on my end as well. Thank you for the fix. 😉

Copy link
Member

@torokati44 torokati44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see nothing obviously wrong with the code (not that I'm an expert in this area... 😉), and I can confirm it fixes at least one annoying issue (that of missing log messages from the audio callback), so LGTM I guess!

@Dinnerbone Dinnerbone enabled auto-merge (rebase) March 5, 2023 09:14
@Dinnerbone Dinnerbone merged commit 806c0fe into ruffle-rs:master Mar 5, 2023
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.

4 participants