Skip to content

Parallel draw command buffer filling#3783

Closed
ExodusCoder9 wants to merge 1 commit into
CaffeineMC:devfrom
ExodusCoder9:dev
Closed

Parallel draw command buffer filling#3783
ExodusCoder9 wants to merge 1 commit into
CaffeineMC:devfrom
ExodusCoder9:dev

Conversation

@ExodusCoder9

@ExodusCoder9 ExodusCoder9 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Basically , this parallelizes draw command buffer filling , mostly did it to shift some work off the main thread , used a forkjoinpool , i profiled in jfr and it shaved off almost 0.7ms off of main thread cpu time , worth it for me for me personally as its a small change. set cores max as 4 because more would probably give vanishing returns because context switching might then take more time than the task does now. also made the hash map concurrent just to avoid any reading of stale data if new code needs it.

…this will help frametimes and also shift some work off the main thread.
@douira

douira commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

I'm not in favor of introducing threading into this highly latency sensitive part of the render loop.

@douira douira closed this Jun 28, 2026
@ExodusCoder9

Copy link
Copy Markdown
Contributor Author

okay understand your concern

@douira

douira commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

If you put your suggestions in our dev channel before you put effort into writing PRs we can tell you whether they would get accepted beforehand. I applaud the initiative though.

@ExodusCoder9

Copy link
Copy Markdown
Contributor Author

okay ,will do from now on thanks for the feedback.

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