Skip to content
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

Simplify VectorTileFeature.decodeProperties #6

Merged
merged 1 commit into from
Jan 1, 2022

Conversation

greensopinion
Copy link
Contributor

Instead of decoding each property to a separate
map, decode to a single map. This reduces Map
allocations, and means that properties can be
resolved with a simple map lookup rather than
iterating through a list of maps and attempting
a lookup in each one.
This improvement reduces memory usage and
makes property lookup more efficient.

Instead of decoding each property to a separate
map, decode to a single map. This reduces Map
allocations, and means that properties can be
resolved with a simple map lookup rather than
iterating through a list of maps and attempting
a lookup in each one.
This improvement reduces memory usage and
makes property lookup more efficient.
@bahung1221
Copy link
Owner

Nice catch!

This is my mistake, I don't remember the reason why I created a Map for each property.
It was published as v0.3.0 (breaking change): https://pub.dev/packages/vector_tile.

Thanks a lot.

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.

2 participants