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

Create cache of field decoders on EntityManager.cs #8

Open
absolutedogy opened this issue Sep 9, 2024 · 0 comments
Open

Create cache of field decoders on EntityManager.cs #8

absolutedogy opened this issue Sep 9, 2024 · 0 comments

Comments

@absolutedogy
Copy link
Contributor

When we are getting field decoders during entity reading, there is a field path being searched each time.

Since this happens dozens of times per entity the processing needed to search through the tree is sub optimal and consuming a lot of cycles.

A better solution would be using some flat dictionary with a hash of the field path that is very fast to compute to look them up.

Not sure entirely how this would look as I played around with somethings, but it should have a sort of flow of taking the field path, hashing it and seeing if it exists in a dictionary for the entity already and returning it right away if it does, otherwise get a serializer for the class and then resolve the decoder by path.

Can't really put more details about this as I am not sure what the end outcome will be, as this is not the only solution, but the goal is to expedite the process of resolving the field decoder based on the field path we are looking for.

Other solutions gladly welcome

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

No branches or pull requests

1 participant