You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During test discovery, ignore Swift types in the Darwin/dyld shared cache. (#392)
This PR modifies the Darwin-specific implementation of runtime type
enumeration such that types in Darwin's dyld shared cache are ignored.
As of macOS Sonoma, there are approximately 300 images in the shared
cache containing approximately 3,000 Swift types, none of which are
reasonably expected to represent test declarations.
We don't need to enumerate these types. Skipping them gets us a speedup
of approximately 27% (according to my very unscientific measurements.)
Images in the current process (including framework binaries) that come
from the shared cache have the `MH_DYLIB_IN_CACHE` bit set in their Mach
headers, so we can easily filter them out.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
0 commit comments