-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache reflection analysis in RowToStructBy...
Modify the RowToStructByPos/Name functions to store the computed mapping of columns to struct field locations in a cache to reuse between calls. Because this computation can be expensive and the same few results will frequently be reused, caching these results provides a significant speedup. For positional mappings, we can key the cache by just the struct-type. However, for named mappings, the key must include a representation of the columns, in order, since different columns produce different mappings.
- Loading branch information
Showing
1 changed file
with
184 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters