Opened 13 years ago

Closed 13 years ago

Last modified 13 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 13 years ago.
Test file with big geometries

Download all attachments as: .zip

Change History (4)

comment:1 by Even Rouault, 13 years ago

Resolution: fixed
Status: newclosed

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

by Mateusz Łoskot, 13 years ago

Attachment: no-xmlns.kml added

Test file with big geometries

comment:2 by Mateusz Łoskot, 13 years ago

Description: modified (diff)

comment:3 by Mateusz Łoskot, 13 years ago

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.