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

Only reevaluate groups on new or updated elements #94

Closed
mattrasto opened this issue Jan 12, 2019 · 1 comment
Closed

Only reevaluate groups on new or updated elements #94

mattrasto opened this issue Jan 12, 2019 · 1 comment
Assignees
Labels
enhancement Improvement on existing feature or functionality
Milestone

Comments

@mattrasto
Copy link
Owner

Currently, when a group is reevaluated during data() in the Network class, it reevaluates over all nodes, not just newly entered or updated elements. In a case of a large network where a small amount of elements are added, this incurs a significant performance cost. Only newly added or updated elements should be reevaluated.

@mattrasto mattrasto added the enhancement Improvement on existing feature or functionality label Jan 12, 2019
@mattrasto mattrasto added this to the 1.0.0 milestone Jan 12, 2019
@mattrasto mattrasto self-assigned this Jan 12, 2019
@mattrasto
Copy link
Owner Author

After more research, this isn't feasible without more robust data management structures. In d3, the update selection contains all elements that are not entered or removed. Thus, evaluating all new and updated elements is effectively the same as evaluating over all elements in the resultant selection after binding the data.

To combat this, we will have to devise a better way to track data updates. Essentially, we would have to implement our own version of the enter-update-exit pattern which differentiates between unupdated and updated data, creating a 4th group. This would best be accomplished after the implementation of #95.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement on existing feature or functionality
Projects
None yet
Development

No branches or pull requests

1 participant