ssc-oscar / DRE

MIT License
4 stars 10 forks source link

Enhancement: graph performance on large projects #47

Open audrism opened 3 years ago

audrism commented 3 years ago

On larger graphs it may time out or crash. Perhaps limit the output of getNeighbors.perl by only showing a part of the project?

Here are the steps: https://worldofcode.org/lookupresult?sha1=8e4a707f68f0ed47de3fd01682679af05c74389c&type=commit Create graph click on red dot Server shows project: ;0mp_freebsd;

Running it on the server it produces 36690 byte output:

~/lookup/getNeighbors p 1 0mp_freebsd | wc Use of uninitialized value $v in division (/) at /home/audris/lookup/getNeighbors.perl line 169. Use of uninitialized value $v in division (/) at /home/audris/lookup/getNeighbors.perl line 169. Use of uninitialized value $v in division (/) at /home/audris/lookup/getNeighbors.perl line 169. 447 528 36690

Debugger on ffox shows:

TypeError: Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method. _nonIterableRest FastGraph.js:12 _slicedToArray FastGraph.js:10 getData FastGraph.js:69 initGraph FastGraph.js:95 makeGraph FastGraph.js:31 promise callbackmakeGraph FastGraph.js:30 onClick FastGraph.js:154 contextListener on.js:27 onAdd on.js:70 default each.js:5 default on.js:94 initGraph FastGraph.js:132 makeGraph FastGraph.js:31 promise callbackmakeGraph FastGraph.js:30 componentDidMount FastGraph.js:36 React 6 unstable_runWithPriority scheduler.development.js:653 React 5 unstable_runWithPriority scheduler.development.js:653 React 6

sylviesworld commented 3 years ago

There are a couple of problems that I am now noticing with the graphs... For example, if you click on a node of the graph to create a new one off of that node, then exit the graph and click the graph button for the original sha, it runs the command to create the graph of the node you clicked on instead of the sha. I'll work on fixing these problems

audrism commented 3 years ago

Great! another thing is to estimate the size of new graph: if one clicks on a project with many commits that may lead to a huge graph: too big to display, so limiting the number of commits may be warranted? I can work on the backend getNeighbors to implement any additional functionality that may be needed.

Also, would it make sense to have labels on/off switch for each type of entity?

sylviesworld commented 3 years ago

I think being able to toggle each label would be a good feature. As it is now it can be hard to read when they are stacked on top of each other.