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

Issue: logging to file incurs intermittent frame drops #841

Open
phu54321 opened this issue Dec 12, 2024 · 2 comments
Open

Issue: logging to file incurs intermittent frame drops #841

phu54321 opened this issue Dec 12, 2024 · 2 comments

Comments

@phu54321
Copy link

Logger.getGlobal().info etc incurs file operation, which intermittently stalls the application.

20241212_213948_idea64_lFHfiiZXMn

Solutions

  1. Make File Handler asynchronous: https://github.com/exch-bms2/beatoraja/blob/91d975358619fb0cb9acc3b267897a2872d29ec5/src/bms/player/beatoraja/MainLoader.java#L58C48-L58C56
  2. Add a checkbox to disable logging to file.
@Catizard
Copy link

Hi @phu54321
beatoraja doesn't produce many logs itself, could you check if you have this similar exception:

严重: スコア取得時の例外:[SQLITE_TOOBIG] String or BLOB exceeds size
limit (statement too long) Query: SELECT * FROM score WHERE sha256 IN
(...)`

This exception is happening when you have a very big BMS directory and beatoraja is trying to join every sha256 together into a massive sql statement. Then exception message(the huge sha256 string) is vomiting to your log file, which might be the real issue. I was working on a patch(Catizard/lr2oraja-endless-dream:fix/sql_too_long@560c7ca) to fix this and can be dropped in beatoraja directly

@phu54321
Copy link
Author

Hello, this issue was found in accident. I encountered an occasional frame drops, and I trird to profile the application. The profiling code created a lot of logs (less than 100kb/s), and it even created more frame drops. I tried profiling it with jfrtofp, and on some system, specifically mine, BufferedWriter takes more than 1s to close, and it incurred a frame drop.

Will test if this weird long file close behavior exists on beatoraja main client itself without excessive logging.

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

No branches or pull requests

2 participants