Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Improvment on clustering performance #3862

Merged
merged 3 commits into from
Mar 31, 2018

Conversation

Menighin
Copy link

With this pull request, my network that was taking around 10s to load (due to clustering) and then more 3 seconds each time I was moving my nodes, now takes 1s to load and the moving is fluid again.

I basically used an object instead of an array that was causing a huge bottleneck on _updateState due to the heavy use of indexOf and I also removed one deepExtend that was not necessary (it was just cloning all the nodes options in the network. And it actually needed to clone none).

Let me know what you guys think.

Regards

Joao Menighin added 3 commits March 9, 2018 23:57
…load instead of 1! =D

That clone was is not needed once we just clone and check for the join condition.
Copy link
Contributor

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@yotamberk yotamberk merged commit 77e16a5 into almende:develop Mar 31, 2018
mojoaxel pushed a commit to visjs/vis_original that referenced this pull request Jun 9, 2019
* Improving the way _updateState deals with deleted edges

* Realized can't simply use it as a Set to check existence. Set the value as the edgeId as well.

* Removing the 1 line that was making my clustering take 10 seconds to load instead of 1! =D
That clone was is not needed once we just clone and check for the join condition.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants