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

Performance boost and code clean-up #97

Merged
merged 11 commits into from
Dec 3, 2024
Merged

Performance boost and code clean-up #97

merged 11 commits into from
Dec 3, 2024

Conversation

laplamgor
Copy link
Collaborator

@laplamgor laplamgor commented Nov 28, 2024

Improve the performance overall

Completed:

  • remove unused code/variables
  • rework regex usage of the Kantai3D mod and 120fps mod
    • reduce ~700MB mem usage when loading main.js, faster loading
  • rewrite regex of mouseDown event replacer
    • reduce ~130MB mem usage when loading main.js, faster loading
  • use string + string instead of String.concat() (the latter is not optimized in compile time)
    • reduce ~140MB mem usage when loading main.js, faster loading
  • combine touchover and touchout regex patterns
    • reduce ~60MB mem usage when loading main.js

Planned (will be another PR):

  • cache main.js in app life-cycle (i.e. only use cached main.js when refreshing in-game, but not at the first load)
  • rework Regex usage of the modCritPatcher mod
  • review all logging level (use DEBUG instead of INFO/WARN/ERROR whenever possible to reduce I/O)

@antest1
Copy link
Owner

antest1 commented Nov 29, 2024

about the logging, logs in code are suppressed by the proguard so you may not need to work on the log level. code

@laplamgor
Copy link
Collaborator Author

I did some tests. The patch main.js is still the same as before.

You can merge when you have time to verify.

@laplamgor laplamgor changed the title [WIP] Performance boost Performance boost and code clean-up Dec 2, 2024
@antest1 antest1 merged commit 4f776e8 into master Dec 3, 2024
@antest1
Copy link
Owner

antest1 commented Dec 3, 2024

thanks for your hard work! I think we also need to work on new equipment filter though orz

@laplamgor laplamgor deleted the performance_boost branch December 12, 2024 01:50
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