[Tilesathome] Minor optimizations to svg2png
Moshe Sayag
msayag at gmail.com
Sun Feb 17 10:53:09 GMT 2008
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;
Moshe
More information about the Tilesathome
mailing list