Comments (5)
Are you saying the slowdown is mostly due to the former, the latter, or both?
In mixed graphs (curvy and straight lines) probably both. In graphs without curvy lines where everything is just a line it is slow because of individual plot objects per edge.
I've updated #94 accordingly
from graphmakie.jl.
You think the proposed solutions are sufficient?
I don't like auto promoting to beziersegments
because of performance reasons. I think it is a bit different for curvy edges, because there both options (beziersegments and linesegments) have a clear usecase. I figured in this case it would be better to just provide a better error message which tells the user to specify the plottype.
from graphmakie.jl.
I think that the specific graph being plotted should not influence whether this gets thrown for otherwise equal properties. More generally, that is probably the case for other vector-valued per-item properties too if there are any that Makie does not itself support. (?)
I'm not sure what makes the bezier case slow, is it the interpolation or is it the fact that every edge then has its own lines
? Because if it's only the former, maybe the right solution would be to do Graphs.ne
many lines
plots instead of a single linesegments
, and lift all properties in the same way that beziersegments
uses? Or even to make beziersegments
use zero interpolated points if the curvature is zero, subsuming the whole linearsegments
case (and explicitly forcing zero curvature should it be required to straighten the lines), thus eliminating the distinction? Or am I missing something?
Otherwise if the performance issues come from using many lines
, one per edge, I think that the better error message should get thrown if linestyle
(or any property that Makie does not support per-item vector definitions for) is a Vector
and edge_plottype
is not :beziersegments
. In the proposed solution, even with the better error, it is not obvious for somebody setting the linestyle
vector that this issue might occur because they may not have tried with a graph that would trigger it.
from graphmakie.jl.
Or even to make beziersegments use zero interpolated points if the curvature is zero
Thats what happens in the moment. BezierPath <: AbstractPath
can be an arbitrary path, that one gets discretized. If there is no curvature, the path for the edge is a Line <: AbstractPath
with trivial discretization of just start end endpoint. In mixed graphs (some Line
s some BezierPath
s) this means the edge pathes array gets typeunstable with dynamic dispatch (at some point someone should investigate whether the type instability is worth the elided discretization). For just Lines
it should be relatively fast. However if you plot graphs with a few thousand nodes it used to be quite slow, presumably because of all the individual plots. Thats why I don't want to give up the linesegments
path which should be fine for most of the plotted graphs. Even though it would be much nicer to not have that distinction.
I am not aware of any other properties where this happens in the moment. So if I understand you correctly you'd prefer the combination of edge_plottype = automatic => becomes beziersegments
to fail in combination with a vector of linestyles, forcing the user to always set edge_plottype
explicitly? I'm fine with taht.
from graphmakie.jl.
In mixed graphs (some Lines some BezierPaths) this means the edge pathes array gets typeunstable with dynamic dispatch
it used to be quite slow, presumably because of all the individual plots
Are you saying the slowdown is mostly due to the former, the latter, or both?
So if I understand you correctly you'd prefer the combination of edge_plottype = automatic => becomes beziersegments to fail in combination with a vector of linestyles, forcing the user to always set edge_plottype explicitly?
Yes, I'd like any use of per-edge (vector) linestyle
to fail with the new error unless edge_plottype = :beziersegments
is set explicitly, to prevent the surprise of this error occurring inconsistently only for some graphs. (This would solve the issue for me.)
from graphmakie.jl.
Related Issues (20)
- curve_distance & curve_distance_usage observable not updating figure
- Precompilation stuck on Julia 1.9 HOT 6
- handle overlapping `nlabels` HOT 6
- node_color and node_marker only accept Symbol HOT 5
- Performant graph plotting and benchmarking HOT 4
- Element-wise `automatic` configuration HOT 1
- Deleting a plot doesn't remove all listeners HOT 2
- Mixing directed and undirected edges HOT 2
- Add padding around graphplot to accommodate node size. HOT 2
- `node_attr` broken using Makie v0.19.11 HOT 1
- Slow start HOT 2
- Setting node size with ilabel
- Improve Reftests HOT 1
- provide convenience function for MetaGraphsNext HOT 7
- KeyError: key :textsize not found when running doc examples HOT 2
- UndefVarError: `mouse_selection` not defined HOT 5
- arrow_shift = :end works poorly with larger edge width HOT 6
- bounding box cuts off nodes HOT 3
- `pick` one `LineSegments` returns odd index HOT 2
- Dynamic Layout + Interaction. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphmakie.jl.