How to use radare2 with large binaries

radare2 looks all fancy and nice, but it is difficult to use with real binaries.

Ever tried to this:

~$ time rabin2 -rs myLargeBinary > rabin_dump.txt
real        9m59.718s
user        9m58.644s
sys 0m0.792s
~$ wc -l rabin_dump.txt
153965 rabin_dump.txt

I tried with a 50MB binary. Takes almost 10 minutes!

Now something similar with readelf:

~$ time readelf -s myLargeBinary > readelf_sym.txt
real        0m0.361s
user        0m0.292s
sys 0m0.064s
~$ wc -l readelf_sym.txt
154573 readelf_sym.txt

How could the difference be so large?

Load the symbols from radare script

r2 -n myLargeBinary
[0x00000000]> ?t . rabin_dump_clean.txt