Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3005 closed defect (fixed)

KML driver painfully slow when reading huge geometries

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.6.2
Component: OGR_SF Version: unspecified
Severity: normal Keywords: kml
Cc: condit, Mateusz Łoskot

Description (last modified by Mateusz Łoskot)

This can be easily shown with no-xmlns.kml file (attached)

It appears that KML::endElement() makes lots of (useless) copies of std::string objects when cutting the content of the <coordinates> element into a vector of triplets. This leads to a O(n*n) complexity (measured in bytes copied) where n is the length of the content of the <coordinates> element.

Attachments (1)

no-xmlns.kml (843.6 KB) - added by Mateusz Łoskot 11 years ago.
Test file with big geometries

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Even Rouault

Resolution: fixed
Status: newclosed

Fixed in trunk (r17076) and in branches/1.6 (r17077)

Changed 11 years ago by Mateusz Łoskot

Attachment: no-xmlns.kml added

Test file with big geometries

comment:2 Changed 11 years ago by Mateusz Łoskot

Description: modified (diff)

comment:3 Changed 11 years ago by Mateusz Łoskot

I've attached no-xmlns.kml file because I may remove it from my server at some point, so it's probably better to have it archived.

Note: See TracTickets for help on using tickets.