-
Notifications
You must be signed in to change notification settings - Fork 0
Fix CPU starvation warning in MillBuildTool classpath extraction #17
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,10 +36,10 @@ object SymbolLister: | |
| Stream | ||
| .eval(IO.blocking(pkg.declarations)) | ||
| .flatMap(decls => Stream.emits(decls)) | ||
| .filter(PublicApiFilter.isPublic) | ||
| .evalFilter(sym => IO.blocking(PublicApiFilter.isPublic(sym))) | ||
|
||
|
|
||
| case ListTarget.Cls(cls) => | ||
| Stream | ||
| .eval(IO.blocking(SymbolResolver.collectClassMembers(cls))) | ||
| .flatMap(syms => Stream.emits(syms)) | ||
| .filter(PublicApiFilter.isPublic) | ||
| .evalFilter(sym => IO.blocking(PublicApiFilter.isPublic(sym))) | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change moves public-symbol filtering onto
IO.blocking, butPublicApiFilter.isPublicis a pure predicate (no file-system calls). Besides the per-element context shift overhead, this is also a discrepancy with the PR title/description which focus on Mill classpath extraction; either document why symbol filtering needed this change (and how it addresses CPU-starvation warnings), or split/revert this part to keep the PR scoped.