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

Chunk data loading is blocking event loop #679

Open
dImrich opened this issue May 30, 2022 · 1 comment
Open

Chunk data loading is blocking event loop #679

dImrich opened this issue May 30, 2022 · 1 comment
Labels
performance Performance improvements or bugs

Comments

@dImrich
Copy link

dImrich commented May 30, 2022

I don't understand why is everything except ChunkBuilder and few other things done in main thread. ChunkBuilder's work only takes ~1ms to complete and is done on different thread. On my low end cpu (i5-2400) method load_chunk19_to_117 is taking 4-6ms to complete and in some weird cases even 30ms which is eating the whole frame budget when chunk packets arrive. Is it possible to load and process chunk data on different thread? I can't see why it wouldn't be possible. Stevenarella in this state is just unusable.

@iceiix iceiix added the performance Performance improvements or bugs label Aug 28, 2022
@iceiix
Copy link
Owner

iceiix commented Aug 28, 2022

Yes I believe this change should be possible. I'm not sure why it was implemented this way with only ChunkBuilder on a different thread instead of chunk parsing, haven't changed the structure of the chunk loading code since it was imported from Steven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance improvements or bugs
Projects
None yet
Development

No branches or pull requests

2 participants