Description
The Shared Cache / Kernel Cache views currently use AddUserSection
when loading images. For example:
binaryninja-api/view/sharedcache/core/MachOProcessor.cpp
Lines 249 to 251 in 83e8981
This is because the sections need to be persisted in the database.
A side-effect of AddUserSection
is that an undo entry is created. This is problematic for performance if the calls happen on a background thread, and it's not clear that it's even desirable. Loading a single image from a shared cache might create 20 sections and thus 20 undo actions.
When an alternative API to AddUserSection
is added that allows persistence of sections without creating undo actions, Shared Cache / Kernel Cache should switch to it. This may come as part of #6742.