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

Threads seem to run at reduced speed in Pyxel (proportional to FPS) #563

Open
dskill opened this issue Sep 5, 2024 · 0 comments
Open

Threads seem to run at reduced speed in Pyxel (proportional to FPS) #563

dskill opened this issue Sep 5, 2024 · 0 comments

Comments

@dskill
Copy link

dskill commented Sep 5, 2024

First off thank you for this amazing game making tool.

I'd like to use it to with some educational LLM/audio generation game experiments, but I noticed that the FPS of pyxel seems to have a very direct impact on how long it takes to execute calls in a thread.

For example, I'd like to run

response = openai_client.chat.completions.create(
            model="gpt-4o",
            messages=messages,
            max_tokens=30,
            temperature=0.7)

in a thread, so that I can get an LLM result back without blocking pyxel's playback. However, if I do that, I have noticed that the time it takes to get a result is very slow (and roughly proportional to the fps I have pyxel set to).

Do you have any advice on how to run threads at full speed in pyxel? Thx!

@dskill dskill changed the title Using Pyxel with other libraries and threads is slow Threads seem to run at reduced speed in Pyxel (proportional to FPS) Sep 5, 2024
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

No branches or pull requests

1 participant