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

Only log errors when scanning mod file contents #95

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

embeddedt
Copy link
Member

Printing a debug-level log for every file path is problematic for two reasons:

  • It creates a mess of the debug.log file, as there's a huge quantity of lines from the scanner at the beginning.
  • It slows down launching the game (on my system, about 50% of the CPU time for the scanner threads is spent logging, rather than scanning).
    Snippet from profiler showing the bottleneck:

image

This information isn't that useful to log in bulk since one could just examine the mod JAR manually to know what files it contains. Instead, we just log if an exception occurs while scanning a given path.

@Technici4n Technici4n merged commit 52148ce into neoforged:main Mar 4, 2024
1 check passed
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