Skip to content

Reduce memory consumption for OutOfDateTriggerHints #180

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
Feb 22, 2024

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Feb 21, 2024

Remove DependentUnitOutOfDateTriggerHint, and collapse the class hierarchy into a single class OutOfDateFileTrigger, which stores both the file name as well as the mod time. Then, change the OutOfDateTriggers map in UnitMonitor to use StringRef keys. This significantly reduces memory consumption for large projects. We could likely go further here by eliminating the storing of triggers completely, but I'm leaving that as future work for now.

rdar://50929788

Remove `DependentUnitOutOfDateTriggerHint`, and
collapse the class hierarchy into a single class
`OutOfDateFileTrigger`, which stores both the file
name as well as the mod time. Then, change the
`OutOfDateTriggers` map in UnitMonitor to use
StringRef keys. This significantly reduces memory
consumption for large projects. We could likely
go further here by eliminating the storing of
triggers completely, but I'm leaving that as future
work for now.

rdar://50929788
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test Windows

@hamishknight hamishknight merged commit d73fecd into swiftlang:main Feb 22, 2024
@hamishknight hamishknight deleted the take-a-hint branch February 22, 2024 22:26
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.

3 participants