aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-03-07 20:42:57 +0100
committerSverker Eriksson <[email protected]>2019-03-07 20:42:57 +0100
commit8dec35910330a44de3fa08573e3029f10b3aa4ae (patch)
treec40a9375b3b7623df83a7dcd34bc34959865a3d4 /erts/emulator/beam/erl_db_hash.c
parentdb6059a9217767a6e42e93cec05089c0ec977d20 (diff)
downloadotp-8dec35910330a44de3fa08573e3029f10b3aa4ae.tar.gz
otp-8dec35910330a44de3fa08573e3029f10b3aa4ae.tar.bz2
otp-8dec35910330a44de3fa08573e3029f10b3aa4ae.zip
erts: Remove ets traversal yielding if heap fragment
Many heap fragments do no longer make the GC slow. Even worse, we are not guaranteed that a yield will provoke a GC removing the fragments, which might lead to a one-yield-per-bucket scenario if the heap fragment(s) still remains after each yield.
Diffstat (limited to 'erts/emulator/beam/erl_db_hash.c')
-rw-r--r--erts/emulator/beam/erl_db_hash.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index cf928a9035..47d304f860 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -1328,11 +1328,7 @@ static int match_traverse(Process* p, DbTableHash* tb,
unlock_hash_function(lck);
break;
}
- if (iterations_left <= 0 || MBUF(p)) {
- /*
- * We have either reached our limit, or just created some heap fragments.
- * Since many heap fragments will make the GC slower, trap and GC now.
- */
+ if (iterations_left <= 0) {
unlock_hash_function(lck);
ret_value = on_trap(context_ptr, slot_ix, got, &mpi.mp, ret);
goto done;
@@ -1451,11 +1447,7 @@ static int match_traverse_continue(Process* p, DbTableHash* tb,
unlock_hash_function(lck);
break;
}
- if (iterations_left <= 0 || MBUF(p)) {
- /*
- * We have either reached our limit, or just created some heap fragments.
- * Since many heap fragments will make the GC slower, trap and GC now.
- */
+ if (iterations_left <= 0) {
unlock_hash_function(lck);
ret_value = on_trap(context_ptr, slot_ix, got, mpp, ret);
goto done;