antvis/G6
The issue has been closed
Hidden items should not be rendered on refresh for better performance #3613
apitts posted onGitHub
Describe the bug
If I create a graph with a meaningful number of edges (say 1,000) and then call graph.refresh() for this graph the time taken to render that graph is the same as if I create the same graph but then hide the edges prior to calling graph.refresh(). This doesn't make sense to me, if an item (node or edge) is hidden then it shouldn't be rendered and there should be a meaningful performance improvement.
Your Example Website or App
https://g6.antv.vision/en/examples/performance/perf#eva
Steps to Reproduce the Bug or Issue
Add this code to the linked example:
graph.getEdges().map((edge) => {
edge.hide();
});
console.time('Refresh');
graph.refresh();
console.timeEnd('Refresh');
See these screenshots...the timing is unchanged
Expected behavior
When items are hidden, the time to render the graph should be reduced.
Screenshots or Videos
No response
Platform
- OS: Linux
- Browser: Chrome
Additional context
No response