Skip to content

Diaphora takes too long exporting!

Joxean edited this page Jun 19, 2018 · 5 revisions

Diaphora is entirely written in Python and it makes it a bit slow. Also, Diaphora can make use of the decompiler resulting in better matching functions between databases, but it will make rather slow the export process. The following is a list of tips to make the export process less painful.

Export only non-IDA generated functions

If you're trying to port your work between different versions of the same target, you do not need to port every single function in the original binary but, rather, just the functions you renamed, added comments, etc... When exporting databases for that task be sure to check the option "Export only non-IDA generated functions". The export process will take considerably less time.

Exporting only function summaries

Sometimes, the original database is so big that it can take too long to export but, for a reason, we're not interested in instruction level differences. For example: we want to port symbols (function names, comments, type libraries, structures, etc...) from one database to the other and we don't care about seeing what is different in both databases. In such cases, be sure to check the option "Do not export instructions and basic blocks", so it will only export function summaries. It will take considerably less time to export, but still will need to go through each function on the database.

NOTE: Diaphora will not be able to show the assembly or pseudo-code differences between databases for those with only function summaries.

The Hex-Rays Decompiler

Diaphora tries to use, by default, the Hex-Rays decompiler. However, it will considerably slow down the export process. If the database is somehow "big" and/or the export process takes too long, uncheck the option "Use the decompiler if available".

NOTE: Naturally, you will not be able to see the pseudo-code differences between databases.

Project Specific Rules

In some cases, we don't really care about all the functions in the database and we're only interested in some specific functions. One can write a Python script using Project Specific Rules to filter which rows must be exported and which ones not, effectively reducing the time the export process will take.