Closed thelostone-mc closed 2 years ago
Here are my results running locally here in the US Atlantic, 50x:
I'm not sure I see an obvious winner here. I'm re-running now with Infura and the default Polygon RPC.
One thing that jumps out is how long the code check takes. I wonder why we're doing that and if it could possibly be eliminated.
Based on my initial runs, I think we can eliminate the default RPC and Infura. They're too far off the other two to be competitive.
It would be awesome if @gdixon and @mds1 could also try running this and posting your results, given your geographic locations. Perhaps it will give some clarity on the choice between Alchemy and Moralis. It's already configured to run with those two, 50x, so it should be as simple as pulling down this branch and navigating to /#/benchmark
.
Here are my results from the UK:
In stressCount
I converted the for
loop to await Promise.all(Array.from(Array(count).keys()).map(async (i) => { try/catch func }))
, so all the RPC requests are fired off in parallel. For some reason the UI wasn't reactive (which is why I didn't push it) so I just logged them out to the console. Results of 500 runs for Alchemy and 250 for Moralis (I think Moralis blocked me from sending that many requests at once because it'd fail with CORS errors)
{
"slowest": {
"fetchCodeTime": 5518,
"fetchAllGrantAndGrantRoundsTime": "64079.20",
"fetchContributionsTime": "20621.40",
"fetchGrantRoundTime": "56600.30",
"fetchLastBlockNumberTime": "2038.70"
},
"fastest": {
"fetchCodeTime": "2970.30",
"fetchAllGrantAndGrantRoundsTime": "12316.10",
"fetchContributionsTime": "18135.30",
"fetchGrantRoundTime": "3575.40",
"fetchLastBlockNumberTime": "845.10"
},
"avg": {
"fetchCodeTimeAvg": "4029.41",
"fetchAllGrantAndGrantRoundsTimeAvg": "53510.27",
"fetchContributionsTimeAvg": "20013.68",
"fetchGrantRoundTimesAvg": "14880.15",
"fetchLastBlockNumberTimesAvg": "1346.02"
},
"median": {
"fetchCodeTimeMedian": 3995.300000000745,
"fetchAllGrantAndGrantRoundsTimeMedian": "63716.20",
"fetchContributionsTimeMedian": "20423.15",
"fetchGrantRoundTimeMedian": "5425.95",
"fetchLastBlockNumberTimeMedian": "1339.30"
}
}
{
"slowest": {
"fetchCodeTime": 10589.19999999553,
"fetchAllGrantAndGrantRoundsTime": "119997.90",
"fetchContributionsTime": "37854.70",
"fetchGrantRoundTime": "44177.80",
"fetchLastBlockNumberTime": "4073.70"
},
"fastest": {
"fetchCodeTime": "5889.20",
"fetchAllGrantAndGrantRoundsTime": "81734.40",
"fetchContributionsTime": "4204.20",
"fetchGrantRoundTime": "12759.20",
"fetchLastBlockNumberTime": "1038.20"
},
"avg": {
"fetchCodeTimeAvg": "7731.22",
"fetchAllGrantAndGrantRoundsTimeAvg": "103870.10",
"fetchContributionsTimeAvg": "33165.95",
"fetchGrantRoundTimesAvg": "26669.76",
"fetchLastBlockNumberTimesAvg": "2460.72"
},
"median": {
"fetchCodeTimeMedian": 7476.550000000745,
"fetchAllGrantAndGrantRoundsTimeMedian": "112246.85",
"fetchContributionsTimeMedian": "37433.55",
"fetchGrantRoundTimeMedian": "26156.05",
"fetchLastBlockNumberTimeMedian": "2606.95"
}
}
Awesome! Thanks @gdixon and @mds1. With these results, it feels like Moralis has taken a clear lead. Any objections to going that route? cc @thelostone-mc
Fine with me!
Description
stressCount
to increase number of pingsThis does a comparison btwn alchemy + moralis
When suite is run 1 time SEE IMAGE
When suite is run 50 time SEE IMAGE
When suite is run 300 times over VPN in US SEE IMAGE
When suite is run over 500 times SEE IMAGE
Moralis seems to be better from what I can tell
Closes https://github.com/dcgtc/dgrants/issues/508 Closes https://github.com/dcgtc/dgrants/issues/487