Features (far) outside viewBox cause memory explosion on export

Bug #257015 reported by Knut Arne Bjørndal
4
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Wishlist
Unassigned

Bug Description

Lines going to someplace far outside the SVG viewBox shouldn't make inkscape memory usage explode. Rendering the attached SVG file took well over 1GB of memory.

I'm guessing inkscape allocates enough memory to render a bitmap of the whole line going far, far outside the set viewBox, which is clearly suboptimal as this is features that will not get shown anyway.

The file was generated by osmarender (http://wiki.openstreetmap.org/index.php/Osmarender), if there is anything we can adjust in the SVG output to make inkscape not use such large amounts of memory then that would be a possible workaround.

The .osm file used as input to osmarender was this:
<osm version="0.5">
     <bounds minlat="49.999" maxlat="50.002" minlon="49.999" maxlon="50.002" />
     <node id="1" lat="0" lon="0" />
     <node id="2" lat="50" lon="50" />
     <node id="3" lat="50.001" lon="50.001" />
     <way id="4">
          <nd ref="1" />
          <nd ref="2" />
          <nd ref="3" />
          <tag k="highway" v="motorway" />
     </way>
</osm>

(yes, we get users doing such silly things as this with the data)

Revision history for this message
Knut Arne Bjørndal (bobkare) wrote :
Revision history for this message
nightrow (jb-benoit) wrote :

I can confirm that your file is a rambomb, and taking so much ram to draw out of screen stuff seems indeed suboptimal

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: performance
tags: added: renderer viewbox
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.