Issue: logging to file incurs intermittent frame drops
Logger.getGlobal().info etc incurs file operation, which intermittently stalls the application.
Solutions
- Make File Handler asynchronous: https://github.com/exch-bms2/beatoraja/blob/91d975358619fb0cb9acc3b267897a2872d29ec5/src/bms/player/beatoraja/MainLoader.java#L58C48-L58C56
- Add a checkbox to disable logging to file.
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
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.