mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-24 12:44:59 -07:00
adjust hash store - first, don't keep strong refcounts for key history past the 2nd hash - this is prohibitively expensive. but, keep 'downstream' refcounts - this is a mechanism which downstream caches (e.g. text visualization info parsing etc.) can use to ensure a hash stays held in the hash store, given some other data's dependence on it - this stops the storing of unnecessary OutputDebugString log copies
This commit is contained in:
@@ -2313,6 +2313,7 @@ ASYNC_WORK_DEF(txt_parse_work)
|
||||
{
|
||||
if(u128_match(n->hash, hash) && n->lang == lang)
|
||||
{
|
||||
hs_hash_downstream_inc(n->hash);
|
||||
n->arena = info_arena;
|
||||
info.bytes_processed = n->info.bytes_processed;
|
||||
info.bytes_to_process = n->info.bytes_to_process;
|
||||
@@ -2340,7 +2341,7 @@ txt_evictor_thread__entry_point(void *p)
|
||||
{
|
||||
U64 check_time_us = os_now_microseconds();
|
||||
U64 check_time_user_clocks = update_tick_idx();
|
||||
U64 evict_threshold_us = 10*1000000;
|
||||
U64 evict_threshold_us = 2*1000000;
|
||||
U64 evict_threshold_user_clocks = 10;
|
||||
for(U64 slot_idx = 0; slot_idx < txt_shared->slots_count; slot_idx += 1)
|
||||
{
|
||||
@@ -2375,6 +2376,7 @@ txt_evictor_thread__entry_point(void *p)
|
||||
n->is_working == 0)
|
||||
{
|
||||
DLLRemove(slot->first, slot->last, n);
|
||||
hs_hash_downstream_dec(n->hash);
|
||||
if(n->arena != 0)
|
||||
{
|
||||
arena_release(n->arena);
|
||||
@@ -2383,8 +2385,7 @@ txt_evictor_thread__entry_point(void *p)
|
||||
}
|
||||
}
|
||||
}
|
||||
os_sleep_milliseconds(5);
|
||||
}
|
||||
os_sleep_milliseconds(1000);
|
||||
os_sleep_milliseconds(500);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user