Skip to content

More metadata cache improvements #4589

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

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Sep 1, 2016

A few more metadata cache improvements.

MetadataCache's allocator into it.

The major functional change here is that MetadataCache will now use
the slab allocator for tree nodes, but I also switched the Hashable
conformances cache to use ConcurrentMap directly instead of a
Lazy<ConcurrentMap<>>.
IIRC we never had any evidence that the performance impact of a
separate allocator here was actually measurable, and it does come
at a significant fragmentation cost because every single cache
allocates at least a page of memory.  Sharing that with the system
allocator makes more sense, even if these allocations are typically
permanent.

This also means that standard memory-debugging tools will actually
find problems with out-of-bounds accesses to metadata.
@rjmccall
Copy link
Contributor Author

rjmccall commented Sep 1, 2016

@swift-ci Please smoke test and merge.

@gottesmm
Copy link
Contributor

gottesmm commented Sep 1, 2016

@swift-ci Please smoke test and merge

@gottesmm
Copy link
Contributor

gottesmm commented Sep 1, 2016

(Not sure why it didn't trigger @rjmccall , But i kicked it off again)

@swift-ci swift-ci merged commit 1ada509 into swiftlang:master Sep 1, 2016
@rjmccall rjmccall deleted the more-metadata-cache-improvements branch September 1, 2016 22:49
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.

5 participants