Improve the rendering of a JUNG graph

拈花ヽ惹草 提交于 2019-12-10 04:10:28

问题


i am using jung to visually display large data sets, (1000s of nodes) but the system becomes very laggy when I zoom in or out, or move a node. Is there anyway to improve the rendering of graphs in JUNG ?


回答1:


The way that I used to improve rendering on graphs was to filter the edges of the graph. Every time you try to move the graph the framework do enormous calculations to reposition every vertex and edge and this causes bad performance. The filtering could be done with adding AbstractPopupGraphMousePlugin succesor to the DefaultModalGraphMouse object you are using. Simply override the handlePopup(MouseEvent mouseEvent).




回答2:


I do not know specifically for graphs, but the usual options are

  1. Only process what is actually shown on screen (zoom in)

  2. Hide details when zooming out

  3. Only update part of the screen that have actually changed content (move a node)



来源:https://stackoverflow.com/questions/2736646/improve-the-rendering-of-a-jung-graph

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!