-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jocelyn Jaubert schrieb: > Hi, > > I have just made a patch so that tilesGen.pl forks in RenderTile > function (which generates png from svg). It is quite simple, as it > calls fork() at the first run of RenderTile. Parent and child then just > draw a different part of the tile. > > I originally wanted to make it multi-thread, but it segfaulted in the > for loop line 1237, but I didn't investigate any more. (it could be a > problem in how GD library is used). > > Patch contains the following modifications: > > * make temporary files safer, by using tempfile() to generate unique > file names. > * addition of $parent_pid so that the child can get the name of the > output-* files used by xml2svg(). This could be replaced by using > coordinates of the tile in file name. > * a new configuration in tilesAtHome.conf to enable or deactivate > fork(). > > I measured time on a very simple tile (2129,1489) which contains only a > road. Total time went from 2:30 to 1:30 on my dual core. > > > The patch can be easily be modified to use 3 children instead of only 1, > and I think that xml2svg could use some fork() too.
The patch is in svn (with minor modifications) Fork=X results in 2^X processes, so Fork=0 is the old behavior, while any positive non-zero integer value makes multiple processes run in parallel. Doesn't seem to work on Windows (Vista?). Needs more testing on Windows multicore/-cpu PCs. - -- Dirk-Lüder "Deelkar" Kreie Bremen - 53.0952°N 8.8652°E -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHQiY3FUbODdpRVDwRAmdUAKCjLOuNOm9NY1dn1j0Kls8O9TaHxACeO9xL uRqhIVKy1PI2gULV+fvMqYw= =gQWb -----END PGP SIGNATURE----- _______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/tilesathome
