Add config 'forcely_yield_count'

the default value 1000 would make a fiber yield on each 4ms on SSD

Apply yield counter in Dir.contents_signauture
Use contents_signature cache in Title.new
This commit is contained in:
Leeingnyo
2021-09-16 00:16:26 +09:00
parent 44a6f822cd
commit 70ab198a33
4 changed files with 13 additions and 8 deletions
+2 -1
View File
@@ -133,8 +133,9 @@ class Library
storage = Storage.new auto_close: false
count = Config.current.forcely_yield_count
examine_context : ExamineContext = {
file_counter: (YieldCounter.new 1000),
file_counter: (YieldCounter.new count),
cached_contents_signature: {} of String => String,
deleted_title_ids: [] of String,
deleted_entry_ids: [] of String,