C
C#ā€¢9mo ago
unknow$

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?
No description
20 Replies
Angius
Angiusā€¢9mo ago
What requests? What system? How do you make those requests? Why do you even need to send 1200 requests a second?
Pobiega
Pobiegaā€¢9mo ago
Looks like htto requests, which would mean you are not limited by cpu
unknow$
unknow$OPā€¢9mo ago
ill send video one sec
Angius
Angiusā€¢9mo ago
Uh, sure? I'd rather see code, but aight, make a video
unknow$
unknow$OPā€¢9mo ago
check dm
Angius
Angiusā€¢9mo ago
No My DMs are and will forever remain closed
unknow$
unknow$OPā€¢9mo ago
alright
Raghavan
Raghavanā€¢9mo ago
Which backend you use?
unknow$
unknow$OPā€¢9mo ago
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()); }
Angius
Angiusā€¢9mo ago
Wait, am I seeing this right? You're trying to bruteforce valid Bitcoin wallet addresses and keys? :KEKW:
unknow$
unknow$OPā€¢9mo ago
absolutely wrong šŸ˜…
Raghavan
Raghavanā€¢9mo ago
That's hard
unknow$
unknow$OPā€¢9mo ago
Why is this happening do u have a idea
Raghavan
Raghavanā€¢9mo ago
Bro if you have Quantum computer it may be possible
unknow$
unknow$OPā€¢9mo ago
I'm aware, man, I'm just wondering why the processing speed of the program has decreased in this way.
Pobiega
Pobiegaā€¢9mo ago
Because you don't understand what await does. Regardless, this is clearly a btc bruteforce attempt.
unknow$
unknow$OPā€¢9mo ago
How long can the wait be?
Pobiega
Pobiegaā€¢9mo ago
creating and sending a request, waiting for a response, processing the response. thats what happens with await client.GetStringAsync
Patrick
Patrickā€¢9mo ago
!ban @unknow$ nefarious software development, brute forcing
Angius
Angiusā€¢9mo ago
Oh come on, if we helped him finish it we would all be rich šŸ˜›
Want results from more Discord servers?
Add your server