The InodeToPathMapper class uses a single ReadWriteLock to control access to the mappings. While it works correctly, a lot of performance is likely left on the table because modifying the mappings locks the entire data structure. A better solution would allow multiple readers and writers to access the mappings.
Here are some ideas ...
Consider using multiple locks to control access to segments of the mappings
Investigation
The
InodeToPathMapper
class uses a singleReadWriteLock
to control access to the mappings. While it works correctly, a lot of performance is likely left on the table because modifying the mappings locks the entire data structure. A better solution would allow multiple readers and writers to access the mappings.Here are some ideas ...
ConcurrentHashMap