Out of memory when draw svg
Bug reports:
When I drew a graph with 5000 vertexes and 890000 edges with graph_draw(g, output="test.svg"), I got a MemoryError.
In fact, at that time Python only used 1G RAM.
When I drew with graph_draw(g, output="apks.pdf"), there is no error and I got a 663M pdf.
I have searched for this issue and got a similar issue https://github.com/Kozea/WeasyPrint/issues/566 but I do not know how to fix it in graph-tool.
Sys: CentOS 7
Compiler: GCC 9.3.0
BOOST: 1.72
Py: 3.8.2
Cairomm: 1.12.2(When I build with the latest version 1.15.5 I got another error and I found someone said you will not fix that bug because it is not a stable version, so I choose 1.12.2)
---------------------------------------------------------------------------
cairo.MemoryError Traceback (most recent call last)
<ipython-input-28-f94cd02d0f62> in <module>
1 # graph_draw(g, vertex_text=g.vertex_index)
----> 2 graph_draw(g, output="test.svg")
3 #
/usr/local/lib/python3.8/site-packages/graph_tool/draw/cairo_draw.py in graph_draw(g, pos, vprops, eprops, vorder, eorder, nodesfirst, output_size, fit_view, adjust_aspect, ink_scale, inline, inline_scale, mplfig, output, fmt, bg_color, **kwargs)
1189 srf.write_to_png(out)
1190 elif fmt == "svg":
-> 1191 srf.finish()
1192
1193 del cr
cairo.MemoryError: out of memory