[Tilesathome] Minor optimizations to svg2png
Dirk-Lüder Kreie
osm-list at deelkar.net
Mon Feb 25 16:13:09 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Moshe Sayag schrieb:
> Hi everyone,
>
> The subroutine svg2png (tilesGen.pl) is called many times during the
> tiles creation, so every minor optimization can improve the overall
> performance.
>
> 1. I've noticed that in every call to svg2png a new directory is
> created ($TempDir), than a single file is created in it ($TempFile)
> and at the end the directory is deleted.
> Is this directory really necessary? Can't the file be created dircetly
> under $Config{WorkingDirectory} ?
>
> 2. The line
> my $Top = $ImageHeight - $Y1 - ($Y2 - $Y1);
> can be replaced with
> my $Top = $ImageHeight - $Y1 - $Height;
> (after changing the lines order), or with
> my $Top = $ImageHeight - $Y2;
I've read your mail, (several days ago, infact). I'm aware of the
problems and am considering a rewrite of the tempfile handling for quite
some time now, patches welcome.
The second suggestion I just applied.
- --
Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0952°N 8.8652°E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHwukVFUbODdpRVDwRAp+oAKCHlXCnWQycfMWbaCN69pSi4auJzQCgqkl9
pFML18tKpL/rq5D+pbtLPu4=
=7/he
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3743 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20080225/610af7de/attachment.bin>
More information about the Tilesathome
mailing list