User:Mr.Z-man/SVG

I've been working on an experimental new SVG converter.

The inkscape people added an option last September to run inkscape as in interactive shell. This allows multiple operations to be done without having to start up and shut down the whole program for each one.

I wrote a quick Python program to run inkscape in shell mode as a daemon process, then wrote a short C program to communicate with it via a UNIX socket.

I did a few profiling tests, similar to those David Gerard did in 2008, though less exhaustive or scientific. The tests were run on a system running Fedora 11 as a guest OS on Sun VirtualBox (Windows Vista host OS) with a 2.0 GHz Intel Core 2 Duo mobile processor with 1024 MB memory given to the VM.

The source code and installation instructions are here.

Test 1
The first test compared ImageMagick (6.5.1-2), Inkscape (0.46+devel), my Inkscape daemon, and rsvg (2.26.0). I didn't test Batik as I didn't want to bother with installing it.

I used 25 randomly chosen SVGs from commons, the PNGs produced were 600px wide. Only total time was calculated for 15 runs. The min, average, and max time for each:

Test 2
In this test I did 1 run over the same 25 images using the inkscape daemon and rsvg only, directly comparing their performance on each image. The time given after each file is the time difference. A positive number means rsvg was faster, a negative number means the inkscape daemon was faster:
 * File: Amphoe_1046.svg :  .36s 
 * File: Blason_Antsirabe.svg :  -.91s 
 * File: Blason_ville_fr_Elbeuf-Empire.svg :  .94s 
 * File: Bundesstraße_1a_number.svg :  -.02s 
 * File: Bw_Buchholz_Gleisplan.svg :  .04s 
 * File: Georgia_46_Connector.svg :  .05s 
 * File: Hammarö_vapen.svg :  .03s 
 * File: Iowa_414.svg :  .01s 
 * File: Kernkraftwerke_in_Deutschland.svg :  1.11s 
 * File: Kit_socks-grey.svg :  -.02s 
 * File: Mapa_levantamiento_campesino_1932.svg :  .49s 
 * File: Map_-_NL_-_Noordenveld_-_Wijk_04_Peize_-_Buurt_20_Peizermade.svg :  .15s 
 * File: Map_-_NL_-_Vlaardingen_-_Wijk_05_Vlaardinger_Ambacht_-_Buurt_03_Babberspolder_West.svg :  .06s 
 * File: Map_of_Georgia_highlighting_Meriwether_County.svg :  5.89s 
 * File: Map_RuaDeSacaduraCabral_zh-hant.svg :  .54s 
 * File: Namerikawa_in_Toyama_Prefecture_Ja.svg :  .02s 
 * File: Oregon_Route_131.svg :  .47s 
 * File: Ortho_minkowski_05.svg :  .02s 
 * File: SF_PERMIT_PARKING.svg :  .03s 
 * File: South_Carolina_512.svg :  .08s 
 * File: Tarrant_County_Texas_Incorporated_Areas_White_Settlement_highlighted.svg :  .41s 
 * File: Tophane_Müşirliği_Anteti.svg :  .05s 
 * File: TTC-signal-block-yellow.svg :  -.02s 
 * File: US_666.svg :  .10s 
 * File: USA_Zapata_County,_Texas_age_pyramid.svg :  -.02s