Repository navigation
Multithreading + Color Rework #234
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
Changes from 2 commits
37ebc32
06e3892
dcea45e
61b9229
59f7706
4c59dfd
056c750
7c9012c
ab78ed3
43f84f8
7098b36
e73f4d0
f7a1328
6febffe
e3e7b58
3238420
9e1e7bb
f5c0ad6
f2d3e48
657dbcf
0a59653
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Krasner marked this conversation as resolved.
Resolved
|
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the mutex is slowing down. We don't need to stop the threads from modifying the same data point (pixel) because they never will since each thread gets a piece of the the image to work on. Additionally, the thread count should be clamped and should be an unsigned tiny type, like a n_threads = std::min(n_threads, height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recommend using 16 for this right now because it really slows down larger images and will make it difficult for mobile users to use the app.
My proposed reversion
Try running this image through it:
Unless you have a strong PC, it'll take a while to process and then lag when you try to color it in or interact with the viewport on the editor page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is in my set of test images. with multithreading it processes fast on my machine which is using an i7-13700H cpu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try processing the image on a cellphone.
In the future, we will add a config panel for the web app, but we don't have that right now, so this could be a problem for some users.