mirror of https://github.com/M66B/NetGuard.git
Limit icon loading threads to number of available processors
This commit is contained in:
parent
fe59be7e89
commit
d56c629159
|
@ -77,7 +77,8 @@ public class AdapterLog extends CursorAdapter {
|
|||
private InetAddress vpn4 = null;
|
||||
private InetAddress vpn6 = null;
|
||||
|
||||
private ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);
|
||||
private ExecutorService executor = Executors.newFixedThreadPool(
|
||||
Runtime.getRuntime().availableProcessors());
|
||||
|
||||
public AdapterLog(Context context, Cursor cursor, boolean resolve, boolean organization) {
|
||||
super(context, cursor, 0);
|
||||
|
|
|
@ -95,7 +95,8 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> im
|
|||
private List<Rule> listAll = new ArrayList<>();
|
||||
private List<Rule> listFiltered = new ArrayList<>();
|
||||
|
||||
private ExecutorService executor = Executors.newCachedThreadPool();
|
||||
private ExecutorService executor = Executors.newFixedThreadPool(
|
||||
Runtime.getRuntime().availableProcessors());
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public View view;
|
||||
|
|
Loading…
Reference in New Issue