Commit facf576
Yevhen Babiichuk (DustDFG)
Restrict brotli usage to devices with more than 2 physical cores
For us it doesn't really matter amount of cores available for us.
We need only physical cores count as we use it for filtering weak
devices.
_SC_NPROCESSORS_CONF - amount of physical cores (android devices
doesn't have extrnal cpu cores hotplug). **Used**
_SC_NPROCESSORS_ONLN - amount of cores available for OS right now.
Often smaller than _SC_NPROCESSORS_CONF because OS can deactivate cores
for powersave
Runtime.getRuntime().availableProcessors() - a core count available to
jvm. Has the same limitations as _SC_NPROCESSORS_ONLN but also can be
decreased because some cores are allocated to other more priority
processes (?)1 parent 985b302 commit facf576
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| |||
0 commit comments