![]() ![]() You can do it, but now you have to pay attention to all the little details yourself. Using custom functions is like flying a plane without autopilot. The docs note this several times, but I'll reiterate here: Custom functions can be expensive. Whatever your performance issue is, you've decided to use custom functions for styling. I suspect you're reading from the DOM (e.g. You've hinted that you're using widgets like. You haven't posted an example or a sample of what you've currently written, so it's not possible for me to say what the performance issue is in your code. It follows that the issue is very likely to be in your own code. Thanks!Ĭhanging the style for 1000 nodes and 2000 edges takes ~150ms the machine I'm using at this moment. I appreciate any suggestions on alternative or complementary strategies for improving performance, as well as comments on our attempts so far. So we would bascially replace cytoscape.js with static images and custom JavaScript. Export each colorized network as an image and put some fixed-position HTML elements (or a canvas?) on top of the image stack for node qtips and such.Cache color hue calculation results with lodash's memoize() or similar (pending).Offload cytoscape.js to a Web worker (produced errors - probably due to worker DOM restrictions - or did not improve performance).Transplant node attributes to separate files that are fetched on demand via XHRs (done, but performance impact unclear).Here are some of the things that we have tried or are contemplating: We face the problem that the page (and so necessarily the whole browser) becomes unresponsive for at least 5 seconds whenever a color change is initiated, and we are looking for strategies to remedy that. Accessory functions include node qtips, finding a node and centering on it (via a select2 dropdown), and highlighting nodes based on their assignment to pre-defined groups (via another select2 drowpdown). The interface allows the user to select different pre-defined coloring options for the nodes (the main functionality) - colors are calculated from one of a set of numeric node attributes. We visualize the networks in custom-built HTML pages (one network per page) with cytoscape.js. and a minified network file size of 1 MB and up.potentially dozens of attributes per element,.around 1000 nodes and 2000 edges (so smaller than this one),.My institution is dealing with several fairly large networks: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |