Contents

johnno1962/profileswiftui

ProfileSwiftUI gives you improved visibility of where CPU is being

How it works.

At the interface between your app and the SwiftUI framework, methods inside SwiftUI are dispatched indirectly through a form of lookup using a writable area of memory (this is the standard means by which the Darwin dynamic linker "binds" between frameworks). Using the fishhook library is is possible to update this dispatch table by symbol name and "rebind" or "interpose" any implementation you would like of these functions.

The SwiftTrace library allows you to generate a logging aspect (trampoline) around each function call which you can interpose these to take the place of the original call destination. To log calls to AttributeGraph a second set of interposes is made on the SwiftUI libray where it calls out. For whatever reason this second interpose only works in the simulator.

Package Metadata

Repository: johnno1962/profileswiftui

Default branch: main

README: README.md