Skip to content

Use new features from Dex 1.2#1706

Draft
kolunmi wants to merge 1 commit into
mainfrom
libdex-1.2
Draft

Use new features from Dex 1.2#1706
kolunmi wants to merge 1 commit into
mainfrom
libdex-1.2

Conversation

@kolunmi

@kolunmi kolunmi commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Begin using DexLimiter (from Dex 1.2) in places instead of the hacky macros from bz-util.h

Will need to do some testing to figure out what the best values are

Begin using DexLimiter (from Dex 1.2) in places instead of the hacky macros from
bz-util.h
@kolunmi kolunmi requested a review from AlexanderVanhee July 5, 2026 13:47
@kolunmi

kolunmi commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

@kolunmi

kolunmi commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

@chergert if you have any suggestions as well based on the diff, please do let me know. Does it make sense for the max concurrent io tasks to be defined in relation to g_get_num_processors? Thanks so much for creating libdex <3

@chergert

chergert commented Jul 6, 2026

Copy link
Copy Markdown

Generally I would pin to core count. Since g_get_num_processors() doesn't guarantee hyperthreading or not, the only real way to get that is to look at the CPU topology. And that isn't even standardized across architectures in /proc/cpuinfo which makes that a rather annoying thing.

So I tend to just do what you've done there, n_cpu/2.

@chergert

chergert commented Jul 6, 2026

Copy link
Copy Markdown

I should also briefly mention, that if this is wrapping something like glycin, you'll probably find it is creating yet another thread pool per process (n_cpu in size) from radon or whatever the underlying codecs are using, so the contention can happen externally to you no matter what you are limiting here.

I'm not a fan of the glycin design in this standpoint, but that ship has sailed, at least as far as upstream GNOME is concerned.

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