C
C#Saintz

How to make this Faster?

Does someone know how to make this faster i would appreciate any help
A
Angius39d ago
That's a lot of dynamic and object Wouldn't surprise me if it was dynamic that was, at least partially, responsible for any performance issues you might be having
S
Saintz39d ago
you have any fixes/corrections in this code? or should i use var?
A
Angius39d ago
var and dynamic are two completely different and unrelated things var is type inference, but still provides strict and static typing dynamic generates the type on runtime, hence the performance cost And object is the equivalent of "anything lmao"
M
mtreit39d ago
Why do you have an async lambda that does no awaits inside of it? Why do you have a maxThreads variable that isn't used? Is your catch block that catches all exceptions running? Exceptions are very slow so if that's happening that would be hurting performance.
S
Saintz39d ago
so i could understand a bit of it do you know what i should change all and what fixes i could do for that? to make it run more smooth / perfomance whise
M
mtreit39d ago
Why are you spinning up 250 tasks that all execute the exact same call?
S
Saintz39d ago
i am doing a method which requires to do alot of requests since it gain with that the amount (more likely an exploit) so i need to use this but i want to make it all faster and i dont see what i should change at all to make it run faster
M
mtreit39d ago
exploit?
S
Saintz39d ago
yes
J
Jimmacle39d ago
as someone who can't access the discord CDN at work i wish people would use the paste site
S
Saintz39d ago
i could paste it but it has to many messages List<Task> tasks = new List<Task>(); int maxThreads = 200; for (int m = 0; m < 250; m++) { Task task = Task.Run(async () => { try { object obj = AMF.SendAMF("MovieStarPlanet.WebService.Bonster.AMFBonsterService.WashBonster", new object[4] { new TicketHeader { Ticket = TicketGenerator.headerTicket(loginResponse["loginStatus"]["ticket"]) }, Convert.ToInt32(ActorBonsterRelId), 100, loginResponse["loginStatus"]["actor"]["ActorId"] },proxy); if (((dynamic)obj)["level"] != 0) { Console.WriteLine("SENT REQUEST LEVEL: " + ((dynamic)obj)["level"]); } } catch { AMF.SendAMF("MovieStarPlanet.WebService.Bonster.AMFBonsterService.WashBonster", new object[4] { new TicketHeader { Ticket = TicketGenerator.headerTicket(loginResponse["loginStatus"]["ticket"]) }, Convert.ToInt32(ActorBonsterRelId), 100, loginResponse["loginStatus"]["actor"]["ActorId"] },proxy); } }); tasks.Add(task); } await Task.WhenAll(tasks); }
J
Jimmacle39d ago
i mean $paste
M
MODiX39d ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
S
Saintz39d ago
ohh i see
M
mtreit39d ago
What do you mean by exploit here?
S
Saintz39d ago
usually you should not be able to do that in this game but since u can use alot of threads and proxys you can do it but i want the code to run smoother
J
Jimmacle39d ago
why do kids come in here thinking we'll help them cheat
S
Saintz39d ago
its not a cheat its an exploit and its related to a kids game so
J
Jimmacle39d ago
same difference and that doesn't change the fact it breaks the rules
S
Saintz39d ago
i mean its just something you could do normally aswell but it would take more time as you would have to farm normally so its just more likely it does the task automatic.
J
Jimmacle39d ago
which is another way to say cheating
S
Saintz39d ago
nope cheating is a difference
L
leowest39d ago
:kekw:
S
Saintz39d ago
big big difference
J
Jimmacle39d ago
botting, exploiting, cheating it's all against the rules
S
Saintz39d ago
its an old kids game which barely have players so does it matter if i do it automated
L
leowest39d ago
Automating things in a way humans cannot is taking advantage of the system aka cheating u said your self its something u can do but takes more time
S
Saintz39d ago
yes
N
Nox39d ago
!ban 558887340555108375 Defending council claims he's not cheating, Mr. Spectre how are we proceeding? Well your honor, it's all the same. Exploits, hacks, all for shame. He knows he's guilty, see him stutter? Let's do the right thing, kick his ass to the gutter.
Want results from more Discord servers?
Add your server
More Posts
#vscode c# debughow can i fix this i was trying to run the program but its not workingHow can i simplify multiple conditions?Hey there I created a database with my ASP.net web api project earlier and now I want to recreate itand I delete my database and created a new one and delete the migrations folder but suddenly when I Object Orient Programming Study with mewho wants to jump on call to study with me object oriented programming im having a little bit of trohow do i split for example t he string "dog" into "d" "o" "g"Help.✅ TreeView scrollbar isn't visibleI have a tree view, and I want it to be scrollable when there are many items. I have tried to put iUnit testing not working, doesn't hit multiple test classesThe first test class runs perfectly fine, but the second one doesnt even get hit. I cant debug or seASP.NET Identity Login ErrorWhen trying to sign in using SignInManager, I get a SqlException: Invalid column name 'UserId1'. WhHow do we read network/handshake messages?Hello friends, I have been given the following task: - I should establish a connection to a WebSockeCan different validation attributed be applied to a field based on the active profile?Hello, In `Development` I would need to apply a different validation attribute to a DTO field, withAndroid Emulatorhow to fix this guys please help me.AS2 over http C# Send message with signature to mendelson server.Hi guys) I am new in this channel. Can you please help me with AS2 over http PKCS#7 .p7s file) Yeah.Persistent error with dotnet cli and installing maui workspaceI've tried time and again now without joy. There is precious little info on this issue out there (onneed tips to improve my logical skills and .net c# skills as I'm a intermediate dev.Hi,I want to improve my logical and .net c# skills so i want please suggest me or guide me about to Issue with Azure AD B2C Custom Domains: Unexpected Redirect Behavior and Domain DependencyHey everyone, I'm hopeful that there are experienced individuals with Azure AD B2C expertise who canNode editor, many operations - how to make it maintainableHi, I'm trying to develop an app with node editor that ideally will provide no code openCV functionacannot close window...Release date of 8.0.3?Hey, I have been struggling with an issue that from what I understand will be solved in 8.0.3. httpRedirecting the native standard output streamI need to call into native code the problem is that it writes some of it's output using stdout. Is iWhere can I find a working library for making a LLVM compiler?I found this library (https://github.com/dotnet/LLVMSharp) that provides extern references for the L