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

Multithreaded Preloading of Data #1844

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Multithreaded Preloading of Data #1844

wants to merge 2 commits into from

Conversation

DrZed
Copy link

@DrZed DrZed commented Jan 13, 2025

  • What is the purpose of the pull request?

    • To improve Save Loading speed (up to 440% faster)
    • To improve New Game speed (up to 104% faster)
  • Give a brief description of what you changed or added.

    • Added DocBuilders.java
      • Replaces the Document Builder in Main with a dedicated cluster
      • This was required to make threading work, as JAXP is not thread-safe
    • Added PreInitializationThread.java
      • This is called fairly early in the stack, before the window is requested to even draw
      • Doing this allows things such as BodyCoverings, Race, ETC to be already prepared when needed
    • Added NPCRegistry.java
      • This moves NPC's from Game.java and makes it easier to see/sort/modify them
      • Split Relationship Registration to it's own function below the NPC Initialization
    • Added NPCThread.java
      • This allows NPC's to be initialized in clusters on separate threads
  • Are any new graphical assets required?

    • Not at all
  • Has this change been tested? If so, mention the version number that the test was based on.

    • This change has been tested and proven for 4 years in my own build mod.
    • It has finally been fully vetted as stable, by roughly 5-11k users varies by version number.
  • So we have a better idea of who you are, what is your Discord Handle?

    • @keldonslayer
  • If you want quick feedback, you can use @Innoxia, or jump on the Lilith's Throne discord and send Innoxia a PM.
    Done did.

@DrZed
Copy link
Author

DrZed commented Jan 13, 2025

I can split these 2 commits into separate PR's if wanted, however both depend on DocBuilders due to the nature of JAXP.

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.

1 participant