|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
SVG Performance?Hello, im new to svg!
I've taken a 300x300 size map and trying to visualize it in svg, im having some success, but the performance is really bad, could somone tell me if im doing something wrong, or is svg not suited for this purpose? Attached, html file with my code, since it's big. Thanks in advance /Kvarkmap.htm |
|
|
Re: SVG Performance?The first suggestion would be to not use hundreds of rectangular paths, use <rect> instead WebKit certainly, and probably Firefox will be able to draw and store rects much more efficiently than paths. A better idea would be to come up with a way to actually make a path that represents large blocks of colour, rather than trying to rasterise the image yourself -- if you raster it yourself you immediately take the "Scalable" out of SVG :D Finally, if your server understands gzip compression of content you may want to make it do that as it will save a lot of the transfer bandwidth requirements --Oliver On May 26, 2007, at 2:09 PM, Kvark wrote: > > Hello, im new to svg! > > I've taken a 300x300 size map and trying to visualize it in svg, im > having > some success, but the performance is really bad, could somone tell > me if im > doing something wrong, or is svg not suited for this purpose? > > > Attached, html file with my code, since it's big. > > Thanks in advance > > /Kvark http://www.nabble.com/file/p10820033/map.htm map.htm > -- > View this message in context: http://www.nabble.com/SVG-Performance--tf3821824.html#a10820033 > Sent from the w3.org - www-svg mailing list archive at Nabble.com. > > > |
|
|
Re: SVG Performance?Hi, Kvark- Kvark wrote: > Hello, im new to svg! Welcome. Just so you know, this list is more for comments about the specification and language itself. Development questions like this are better sent to svg-developers@... . > I've taken a 300x300 size map and trying to visualize it in svg, im having > some success, but the performance is really bad, Performance will generally vary with different user agents (Firefox, Opera, Safari, ASV, etc.), so it's often useful to state which browser you're having trouble with. > could somone tell me if im > doing something wrong, or is svg not suited for this purpose? This map is made up of around 10K path elements, which is a pretty large sample. I converted the paths to line elements and removed the extraneous "stroke-width" attribute (which was present on every path). [1] It performs moderately well in Opera and ASV, but is still very slow in Firefox. I would suggest that you take another approach that doesn't use so many elements. You could describe each zone as its own element, and then create colored zones to overlay that to show the various catgories. Without knowing exactly how you plan to use this map, it's hard to recommend anything specific. Do you need that number of discrete lines? Also, I noticed that all of your colors were in uppercase, and SVG is case-sensitive (so they should all be lowercase). In addition, you have some elements with fill values that aren't color keywords ("NO_SWIM", "WATER_SWIM", "FIREPLAN"). [1] http://svg-whiz.com/svg/temp/slow-map2.svg Regards- -Doug |
| Free embeddable forum powered by Nabble | Forum Help |