bramp / js-sequence-diagrams

Draws simple SVG sequence diagrams from textual representation of the diagram
https://bramp.github.io/js-sequence-diagrams/
BSD 2-Clause "Simplified" License
7.81k stars 1.08k forks source link

Loading fonts through SVG makes it slow #153

Closed mnot closed 7 years ago

mnot commented 8 years ago

Loading https://www.mnot.net/blog/2016/04/22/ideal-http with the default hand theme takes between 7-12 seconds on modern browsers / hardware. Changing to another font (e.g., sans-serif) reduces page load time to under a second.

bramp commented 8 years ago

Yes, I am aware and apologise that loading the hand drawn font is terribly slow. This is a limitation in the Raphael.js library I use for generating the SVG. So that Raphael can maintain it's compatibility with VML (for IE), it includes the font as a vector within the SVG.

I'm currently working on 2.0 of js-sequence-diagrams[1] that moves to the snap.svg library. This drops the legacy VML support, and allows the SVG to be styled with CSS, and use standard fonts.

[1] https://github.com/bramp/js-sequence-diagrams/tree/svg

mnot commented 8 years ago

No worries, thanks!

pkanthi commented 8 years ago

Great. What would be the expected release timeline for js-sequence-diagrams 2.0?

bramp commented 7 years ago

ok js-sequence-diagram 2.0 is now out, and the font can be specified via normal CSS.