Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Jun 9, 2021

This is a pretty big PR which makes our type handler binding lazy; it both helps perf in various ways (no need to set up all those exotic type handlers for everyone, and take up memory), and gets some AOT-unfriendly code out of the way unless it's really used (e.g. range binding).

This also changes how mappings are tracked across the global and connector type mappers. The global type mapper now maintains immutable mapping data structures which are simply referenced directly by the connector type mappers. If users do any mapping changes on a connector (rare), we copy-on-write the structures to the connector type mapper.

Since this is a big change, I expect there to be a bug-tail in 6.0.0 for some more exotic mapping changes. Careful reviewing would be greatly appreciated! /cc @vonzshik @NinoFloris @Brar

Closes #3816
Closes #2263
Part of #3300

@roji roji requested a review from vonzshik as a code owner June 9, 2021 11:49
@roji roji requested a review from vonzshik June 11, 2021 11:11
@roji roji requested a review from vonzshik June 11, 2021 15:19
Copy link
Contributor

@vonzshik vonzshik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Lazy allocation of type handlers (again) Speed up connection-specific mapping changes

2 participants