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

INode.Edges cast in INode{} implementation is slow! #34

Closed
Kemsekov opened this issue Feb 23, 2022 · 1 comment
Closed

INode.Edges cast in INode{} implementation is slow! #34

Kemsekov opened this issue Feb 23, 2022 · 1 comment
Labels
important Something with top priority to do Refactor Need to refactor code

Comments

@Kemsekov
Copy link
Owner

This part is really slow

        IEnumerable<IEdge> INode.Edges => this.Edges.Select(n=>n as IEdge);

It will do Select for each edge any time you will try to access Edges property. Because if this current version of library is 3x slower than previous one. Fix it

@Kemsekov Kemsekov added Refactor Need to refactor code important Something with top priority to do labels Feb 23, 2022
@Kemsekov
Copy link
Owner Author

Kemsekov commented Mar 2, 2022

I fixed it but I had to add extra abstraction level and It is still not perfect solution, so I will rename issue

@Kemsekov Kemsekov closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
important Something with top priority to do Refactor Need to refactor code
Projects
None yet
Development

No branches or pull requests

1 participant