summaryrefslogtreecommitdiff
path: root/plugins/dex
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-22 18:36:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-22 18:36:15 (GMT)
commitf251814cf0fd10a767972530c119f8f109613c48 (patch)
treee9bd67bca2531c083ee0754fe6dabe043c8012d1 /plugins/dex
parentc1bcf3e7bd0a256005bd15832117b78cee5fdfab (diff)
Fixed run sizes of parallel jobs.
Diffstat (limited to 'plugins/dex')
-rw-r--r--plugins/dex/pool.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/dex/pool.c b/plugins/dex/pool.c
index d95f519..fb710f3 100644
--- a/plugins/dex/pool.c
+++ b/plugins/dex/pool.c
@@ -77,9 +77,7 @@ bool load_all_dex_string_symbols(GDexFormat *format, wgroup_id_t gid, GtkStatusS
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -288,9 +286,7 @@ bool load_all_dex_types(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *sta
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -447,9 +443,7 @@ bool load_all_dex_fields(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *st
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = count / runs_count;
+ run_size = compute_run_size(count, &runs_count);
queue = get_work_queue();
@@ -758,9 +752,7 @@ bool load_all_dex_methods(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *s
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = format->header.method_ids_size / runs_count;
+ run_size = compute_run_size(format->header.method_ids_size, &runs_count);
queue = get_work_queue();
@@ -898,9 +890,7 @@ bool load_all_dex_classes(GDexFormat *format, wgroup_id_t gid, GtkStatusStack *s
/* Lancement des chargements */
- runs_count = get_max_online_threads();
-
- run_size = format->header.class_defs_size / runs_count;
+ run_size = compute_run_size(format->header.class_defs_size, &runs_count);
queue = get_work_queue();