Skip to content

Adopt faster traverseModules implementation in SwiftPM #1683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 18, 2024

Companion of swiftlang/swift-package-manager#7977


Adjustments because traverseModules no longer returns depth

We no longer need depth. Adopt a faster version of traverseModules that doesn’t return the depth.

rdar://136107035

@ahoppen ahoppen changed the title Adopt faster traverseModules implementation in SwiftPM Adopt faster traverseModules implementation in SwiftPM 🚥 #1682 Sep 18, 2024
We no longer need `depth`. Adopt a faster version of `traverseModules` that doesn’t return the depth.

rdar://136107035
@ahoppen ahoppen changed the title Adopt faster traverseModules implementation in SwiftPM 🚥 #1682 Adopt faster traverseModules implementation in SwiftPM Sep 19, 2024
@ahoppen
Copy link
Member Author

ahoppen commented Sep 19, 2024

@ahoppen ahoppen merged commit 6248d22 into swiftlang:main Sep 20, 2024
3 checks passed
ahoppen added a commit to swiftlang/swift-package-manager that referenced this pull request Sep 20, 2024
…7977)

Companion of swiftlang/sourcekit-lsp#1683

---

Opening the SourceKit-LSP workspace using a debug build of sourcekit-lsp
takes about 35s because `traverseModules` generates about 800,000
callback calls. All SourceKit-LSP needs now are the modules and their
dependencies, so we can refactor `traverseModules` to just return that
information avoid visiting the same modules multiple times. With theses
changes getting all modules and their dependencies only takes ~0.013s.

rdar://136107035
@ahoppen ahoppen deleted the traverse-modules branch September 20, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants