Skip to content

handlerCache removal#45

Merged
puredanger merged 2 commits intomasterfrom
cache-fix
Feb 3, 2026
Merged

handlerCache removal#45
puredanger merged 2 commits intomasterfrom
cache-fix

Conversation

@JarrodCTaylor
Copy link
Contributor

----- d85f75d
Remove cache from ReaderFactory and delete Cache.java

The handlerCache in ReaderFactory used a synchronized block that caused
contention. The cache benefit was outweighed by the synchronization
overhead.

----- 9c2a8a7
With this change, Cache.java is no longer used and has been removed.

Remove cache from WriterFactory

The handlerCache in WriterFactory provided no benefit.
buildWriteHandlerMap() always created a new WriteHandlerMap on return,
regardless of cache hit or miss.
This removes the cache and its synchronized block, eliminating
unnecessary contention overhead.

The handlerCache in WriterFactory provided no benefit.
buildWriteHandlerMap() always created a new WriteHandlerMap on return,
regardless of cache hit or miss.
This removes the cache and its synchronized block, eliminating
unnecessary contention overhead.
The handlerCache in ReaderFactory used a synchronized block that caused
contention. The cache benefit was outweighed by the synchronization
overhead.

With this change, Cache.java is no longer used and has been removed.
@puredanger puredanger merged commit 3edb7d4 into master Feb 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants