danubetech / libindy-common-java Goto Github PK
View Code? Open in Web Editor NEWShared library for HL Indy related functionality
Shared library for HL Indy related functionality
As discussed here, I noticed that the Indy and Sov Drivers for the Universal Resolver take up to 3 minutes for the first Resolve Request, because all IndyConnections are only opened once the first request comes in.
As @peacekeeper mentioned in the issue linked above, there is two ways to solve this: Only open the connection for the pool requested or open the pools when the driver is started and speed up the opening.
I think the second option is preferable, because
a) it catches problems with the pool Configs during start and not only when the pool is actually queried
b) it makes resolve queries more predictable in terms of how long they take
c) as I will describe below, if parallelized, the additional time needed during start would nearly equal the time needed to open the slowest pool (in my case the IDUnion Test, but several pools have a similar time). So the call to one of these slow pools would need nearly as much extra time for opening the pool as we would need to open all pools during the start of the driver.
In a first step, I am trying to reduce the runtime for IndyConnector.openIndyConnections()
.
I checked the runtimes for the different for loops in IndyConnector.openIndyConnections()
and found that (unsurprisingly) the last for-loop which is actually creating the connections takes 99% of the runtime.
I used parallelStream to parallelize that for-loop and just collected the exceptions into a list to throw them after all networks attempted to open the connection.
I found that this reduces the runtime from 2-3 minutes to 20-40 seconds, which is basically the runtime of opening the slowest pools when done sequentially.
I opened a Pull Request with the changes. I am not sure whether some further improvement is possible but it would probably need to come from the IndyConnection.openPool()
function. But I think 20-40 seconds is accetable during the start of the drivers, especially compared to 2-3 minutes during the first request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.