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

Remember optimal server settings #69

Open
BruceKristelijn opened this issue Feb 2, 2024 · 4 comments
Open

Remember optimal server settings #69

BruceKristelijn opened this issue Feb 2, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@BruceKristelijn
Copy link
Contributor

Describe the feature

With the introduction of the fallback to CPU and --no-mmap I was thinking. Maybe start up can be sped up on a repeated run by remembering what setup worked for this user? So the first time the LLM.cs will recognise what works and the other times a user starts up the game it will run in these settings.

I am unsure how to implement this yet (how / where to store this?) and probably something for the future but can help speed up launch times for users.

@BruceKristelijn BruceKristelijn added the enhancement New feature or request label Feb 2, 2024
@amakropoulos
Copy link
Collaborator

Very good point! I think something like this can be implemented with PlayerPrefs.

@BruceKristelijn
Copy link
Contributor Author

PlayerPrefs are an option but as a developer I try to not use them in production. These seem to be saved in some (in my opinion) odd places. I problem I forse with PlayerPrefs is that when something does not work for the end-user it is a bit harder to help them reset the settings themselves. It would seem more elegant to tell them to go to to Application.persistentDataPath and remove a certain file so LLMUnity can generate new ones? Let me know what you think!

@amakropoulos
Copy link
Collaborator

Yes you are right, that's better!

@BruceKristelijn
Copy link
Contributor Author

I tried some things with this today but I am unsure if the current setup can achieve it.

Feel free to checkout my initial test here:
https://github.com/Savanna-Developments/LLMUnity/tree/saving_settings

I added code to generate a hardware hash and added a way to get the package version. In the script LLMSerializedSettings.cs I added a check to check if any of these change to make sure the server command is "regenerated" so the ideal setup can be detected again. However I have some concerns at the current setup:

  • Right now I basically save the working server command. But what if the install directory changes, this should also be detected and captured.
  • I feel that storing a long string is not ideal. But I am unsure how else this can be achieved with the current setup.

Maybe any other ideas / solutions? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants