Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too long search time of UI Root #75

Open
ComeInRage opened this issue Mar 18, 2022 · 7 comments
Open

Too long search time of UI Root #75

ComeInRage opened this issue Mar 18, 2022 · 7 comments

Comments

@ComeInRage
Copy link
Contributor

Hello,
I use your library with my own C++ application. So that I use .json result of your memory-reading library, parse it and do something with result. The main problem is the time it takes to search candidates in UI Trees in your library. On my computer it is around 3 minutes. Of course I save root addres from .json result and push it in the --root-address argument next launch, but first execution of application is terribly slow. How I can improve it?

Best regards,
Grigory

@Viir
Copy link
Collaborator

Viir commented Mar 20, 2022

In most instances, the initial process to find the root takes less than 15 seconds. So the three minutes with your setup are a lot more.
You can check the usual time for your computer by running an app like this: https://github.com/Viir/bots/blob/main/guide/eve-online/eve-online-warp-to-0-autopilot-bot.md

It will record the timings to see in more detail where time is spent.

@ComeInRage
Copy link
Contributor Author

ComeInRage commented Mar 26, 2022

I mean that it searches UI root about 3 minutes, if i don't specify --root-address option. If i found ui root address and specify it it takes about 1 second to read information. All time is spending to find UI root candidates in whole memory of eve online process and create process sample (it creates anyway). As soon as program writes in console "Reading from process sample" it starts to run normally and it takes about 15 seconds to read from created process sample.

@Viir
Copy link
Collaborator

Viir commented Apr 1, 2022

Does it only take so long with your program, or does it also happen when you run an app like a2aa08658d745522?
If it is generally slow on your machine, you could use a profiler to see where the time is going.

@ComeInRage
Copy link
Contributor Author

It takes a lot of time only when i starts command manually in mode read-memory-eve-online from command line. I used binary file from latest release.

@Viir
Copy link
Collaborator

Viir commented May 20, 2023

When starting from the command line, there are various options. That duration might be normal depending on which combination of arguments you use in your command line. Some combinations are not popular and, therefore, have not been optimized so far.

@ranc1
Copy link
Contributor

ranc1 commented Jul 20, 2023

Hello,
I have had the same experience on the command line. I believe the majority of the latency comes from EnumeratePossibleAddressesForUIRootObjects function, which takes a long time during the root search when the root address is not already provided. On my computer, it takes ~60 seconds to go over the ~7000 memory regions. I tried increasing the parallelism from 2 to 8 here and got no significant improvements in latency. I assume the tasks have high variances.
There is another contributing factor which I mentioned in the other Issue. However, this is only a couple of seconds of delay on top of the previous one.

@strich
Copy link

strich commented Jan 21, 2024

@ranc1 did you ever improve this much?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants