rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.4k stars 1.14k forks source link

Graph is slow to open when opening a big function #2099

Open ITAYC0HEN opened 4 years ago

ITAYC0HEN commented 4 years ago

Environment information

Describe the bug When opening a file and seeking to a big function, Cutter is slow to respond until the disassembly or Graph widget shows the function.

To Reproduce

cutter_slow_graph

Steps to reproduce the behavior:

  1. Open the attach binary in Cutter
  2. Seek to the function 0x140012D30 in disassembly view
  3. Change to graph in this function by pressing space or by right clicking and choosing Open in new graph.
  4. See delay in opening

Expected behavior

The graph should be shown smoothly

File: flagcheck.zip

karliss commented 4 years ago

What is the recommended analysis level?

karliss commented 4 years ago

For ?t agJ I got 2.8 seconds. Likely the same as #1974. But in this case there aren't that many local variables so it might be something else causing disassembly to be slow.

ITAYC0HEN commented 4 years ago

What is the recommended analysis level?

The default one. aaa

karliss commented 4 years ago

Out of those 2.8 seconds 2.1 is spent here https://github.com/radareorg/radare2/blob/778c42cfa7b9783b39aeda52993fa6b4fc7161f1/libr/core/disasm.c#L4123 .

karliss commented 4 years ago

Let's not write "latest from git" as version. If the the problem doesn't get fixed immediately it gets confusing what the "latest from git" after few weeks or months is.

ITAYC0HEN commented 4 years ago

Let's not write "latest from git" as version

agreed :) Will add "(version x.y.z)"

radare commented 4 years ago

The variable and type analysis code in r2 is the main bottleneck in disasm and analysis right now. There are several other points of interest but i didnt had a chance to investigate yet and disnt had time to improve thst code. But will do at some point. Feel free to run the profiler and share the results

On 15 Mar 2020, at 20:00, Itay Cohen notifications@github.com wrote:

 Let's not write "latest from git" as version

agreed :) Will add "(version x.y.z)"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.