https://bugzilla.wikimedia.org/show_bug.cgi?id=27508

--- Comment #8 from Bawolff <bawolff...@gmail.com> 2011-03-05 02:02:14 UTC ---
Created attachment 8245
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8245
Patch to only look at so much of the svg file for metadata.

How about we only look in the first 512 kb for metadata information

*Most svg files (ignoring the crazy maps) aren't even anywhere near 256 kb big
*The SVG metadata <title> and <desc> tags are almost always at the very
beginning
*256 kb (Which i chose arbitrarily) of svg can be parsed pretty much
instantaneously by our SVGReader class (in my tests anyways using eval.php)

Patch attached that does that. After using the patch I can successfully
uploaded the Puerto_Rico_ecosystems_map-fr.svg to my wiki where before i ran
into an execution time exceeded in SVGMetadataExtract type error. (Still took a
long time, but i thing that's mostly from convert, which eventually gets killed
by ulimit.sh) And parsing that svg using SVGReader is pretty much instantanous
when done from eval.php (as i mentioned earlier in this comment) where before
it took something like 7 minutes.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to