Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Performance Issues #42

Closed
AlexETF opened this issue Dec 27, 2016 · 0 comments
Closed

Performance Issues #42

AlexETF opened this issue Dec 27, 2016 · 0 comments

Comments

@AlexETF
Copy link

AlexETF commented Dec 27, 2016

Hello,

I am currently working on application for making network topology, similar to Packet Tracer tool. User can drag and drop items onto graph, make connections, configure devices.

In my application I have switches with different number of ports. Idea that I have is to display switches like regular polygons depending on the number of ports with image of switch in center of it. I have switches with 6, 8 and 24 ports (for 6 port switch shape would be hexagon, for 8 octagon etc)

I created my custom shape, extended mxActor and redefined redrawPath method so it creates desired polygon and draws image in center of polygon depending on the parameter for ports. On each intersection of polygon sides I have port of the switch like on image below.

switches

Each port of the switch is vertice where parent cell is my custom shape vertice.

Problems that I am facing is when I add more than 60 24-port switches my application is lagging.
I am aware that for every 24-port switch I have 25 vertices.

I checked my calculations for drawing polygon, they are not the issue, they are only made once when main switch cell node is created, later positions of child port vertices are used to redraw shape in redrawPath method of my custom shape.

My application also has outline for graph view (little rectangle in the corner that displays whole view).

Am I reaching limitations of the library in my application ? Do you have any advice how to improve performance (ex. use anchors instead of vertices for ports ) ?

I was wondering if virtualization would be the solution for this. By virtualization I mean displaying
only current visible part of graph view to user. If so, is there a proper way of implementing this using mxGraph.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants