Why do requests slow down the program so much?
As I mentioned in the title, I have a multi-threading system. It uses 100% of my processor. My program makes about 1200 checks per second, but when I add the part where I need to send requests to the system, it makes almost 40, 50 checks per second and uses %5 of my processsor
The response time to my request is very short, I don't understand why this is happening. Is there any way I can fix this?
20 Replies
What requests? What system? How do you make those requests?
Why do you even need to send 1200 requests a second?
Looks like htto requests, which would mean you are not limited by cpu
ill send video one sec
Uh, sure?
I'd rather see code, but aight, make a video
check dm
No
My DMs are and will forever remain closed
alright
Which backend you use?
for (int i = 0; i < Environment.ProcessorCount; i++)
{
Thread thread = new Thread(async() =>
{
while (true)
{
string mnemonicPhrase = new Mnemonic(Wordlist.English, WordCount.Twelve).ToString();
ExtKey masterKey = new Mnemonic(mnemonicPhrase).DeriveExtKey();
ExtKey btcPrivateKey = masterKey.Derive(keyPath_btc);
PubKey pubKey_btc = btcPrivateKey.PrivateKey.PubKey;
var btc_Address = pubKey_btc.GetAddress(ScriptPubKeyType.Legacy, Network.Main);
Interlocked.Increment(ref localcheck);
Console.WriteLine($"{localcheck} \n Address : {btc_Address} \n");
}
});
thread.Start();
}
In this state, the program can generate more than 1000 addresses per second.
But when I add a request section to the program, this rate fall significantly.
request section;
try
{
string btc_Response = await client.GetStringAsync($"https://------/{btc_Address}");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
Wait, am I seeing this right? You're trying to bruteforce valid Bitcoin wallet addresses and keys?
:KEKW:
absolutely wrong
š
That's hard
Why is this happening
do u have a idea
Bro if you have Quantum computer it may be possible
I'm aware, man, I'm just wondering why the processing speed of the program has decreased in this way.
Because you don't understand what
await
does.
Regardless, this is clearly a btc bruteforce attempt.How long can the wait be?
creating and sending a request, waiting for a response, processing the response.
thats what happens with
await client.GetStringAsync
!ban @unknow$ nefarious software development, brute forcing
Oh come on, if we helped him finish it we would all be rich š