Hi Chris,

Just FYI, I've been playing around with the SVG output to see whether
I could improve "draggability" for the 1000 molecule SVG discussed at
[1]. I didn't edit the OB code; I just wrote a Python script to
transform the SVG (see [2]).

(A) There was a suggestion in the comments at [1] that:
"Would be better (performance-wise) if you didn't stroke the text,
that tends to be expensive compared to simply filling the text. If you
want bold text just use 'font-weight' to do that instead. "

I tried this out, and there was only a small difference in memory
usage and file size, and it didn't seem to make any difference to
performance when dragging 1000 molecules around.

(B) I noticed some repetition in stroke specs for the lines, so I
grouped them together with <g stroke="rgb(0,0,0)"  stroke-width="2.0">
(naturally this only works because they are all black by default).
This led to a 1/3 decrease in file size and memory. However it still
didn't seem to make any difference to performance when dragging 1000
molecules around.

So...in short, it doesn't seem to be worth it to edit the OB code.

For fun, I played around with CSS. If you install Firebug in Firefox,
you can edit the CSS properties on the fly. For example, you can enter
stuff like
line {
    stroke-width: 5;
}

and immediately the SVG has wider lines. I'm not sure if this is very
useful though.

- Noel

[1]  
http://baoilleach.blogspot.com/2011/06/molecular-zooming-with-open-babel-svg.html
[2] https://gist.github.com/1966793

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to