Bug 53815 - FileServer synchronisation is rather crude
Summary: FileServer synchronisation is rather crude
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-02 12:58 UTC by Sebb
Modified: 2012-09-02 12:58 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2012-09-02 12:58:19 UTC
FileServer needs to be synchronised to provide thread-safety.

However, the synchronisation is applied at instance level.
This is unnecessary for at least part of the time.

The files Map is mostly read, not written, so could be protected using read/write locks. A Concurrent Map would not be sufficient here, as the updates need exclusive access.

Access to a single FileEntry instance would still need to be single-threaded to prevent problems when sharing a file across multiple threads.

Making such changes should improve performance by reducing lock waits.