You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DiskCache.waitForTask calls ConcurrentHashMap.computeIfAbsent, and inside of the lambda for a populated cache, makeOutput() will be called. This calls hashContents(), which is roughly IO bound, and means that any other threads have to wait to potentially begin work.
Naive answer would be to move that IO work off-thread or out of the lock, but the simplest answer is likely to just write down the cache details, as #176 is already doing, and read the hash from disk for each file, rather than re-hashing each file.
The text was updated successfully, but these errors were encountered:
DiskCache.waitForTask
callsConcurrentHashMap.computeIfAbsent
, and inside of the lambda for a populated cache,makeOutput()
will be called. This callshashContents()
, which is roughly IO bound, and means that any other threads have to wait to potentially begin work.Naive answer would be to move that IO work off-thread or out of the lock, but the simplest answer is likely to just write down the cache details, as #176 is already doing, and read the hash from disk for each file, rather than re-hashing each file.
The text was updated successfully, but these errors were encountered: