[JAVA-1353] Investigate async speed Created: 06/Aug/14  Updated: 20/Jan/15  Resolved: 20/Jan/15

Status: Closed
Project: Java Driver
Component/s: Async
Affects Version/s: None
Fix Version/s: 3.0.0

Type: Task Priority: Major - P3
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Async

 Description   

The InternalStreamSpecification highlighted with a mocked stream that 100,000 calls to receiveMessageAsync in a thread takes ~1.3x the time it does for the sync equivalent.

Benchmark and review the futures efficiency



 Comments   
Comment by Ross Lawley [ 20/Jan/15 ]

No longer seems to be an issue, updating the tests so the number of operations back to 100,000. I got the following results

./gradlew :driver-core:test --rerun-tasks test --info --tests="*InternalStreamConnectionSpecification" | grep threadsafe | grep SUCCESS
 
 
[Test should have threadsafe connection pipelining] SUCCESS (3465 ms)
[Test should have threadsafe connection pipelining asynchronously] SUCCESS (3696 ms)
 
[Test should have threadsafe connection pipelining] SUCCESS (3849 ms)
[Test should have threadsafe connection pipelining asynchronously] SUCCESS (3479 ms)
 
[Test should have threadsafe connection pipelining] SUCCESS (3482 ms)
[Test should have threadsafe connection pipelining asynchronously] SUCCESS (3575 ms)

Generated at Thu Feb 08 08:54:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.