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

Did you find this page helpful?