Arcitectus / Sanderling

APIs and libraries to read information directly from the EVE Online game client.
https://forum.botlab.org
Apache License 2.0
260 stars 117 forks source link

Proposal for optimizing the used RAM #72

Closed Nimistren closed 2 years ago

Nimistren commented 3 years ago

After examining the Program.cs code, I would like to offer you a solution to the problem using 4-5 GB of memory during the Root address search stage. You just don't have to keep content in memory all the time. It is enough to iterate over the list of base addresses, and get content only for the considered range byte []. To be honest, I managed to do this, but alas, my c # level is much lower than yours and I'm just ashamed to upload this code, which I did, but I can assure you that the RAM consumption has decreased to 200-300 megabytes, the search time has increased by 15 20 seconds compared to the original code. If you want, I am ready to provide a sample of my code to you personally.

Viir commented 3 years ago

Thank you for sharing your improvement. In case anybody runs into the same problem, I recommend they try your adaptation.

Warstone commented 3 years ago

You need only ~ 20Mb of memory (with C# footprint itself) and speed boost in about 50 times if you throw away that shit that written there and write it with unsafe.

Whoit-wtf commented 1 year ago

@Viir Hello, could you share this memory optimization?

Viir commented 1 year ago

@Whoit-wtf sure, you can read it at https://github.com/Arcitectus/Sanderling/issues/72#issue-803258104