summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-11-14 15:35:27 +0000
committerNorbert Preining <preining@logic.at>2008-11-14 15:35:27 +0000
commit9ef5ebfbefd14e51bb12d257e2ab013781a77b9f (patch)
tree89303bc25477d8421cbbe79f4dab179d7df0300b /Master
parent5fab70b00334fbb7e8958cee1d4971d09223c65e (diff)
further speed up tlpdb reading
git-svn-id: svn://tug.org/texlive/trunk@11298 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 17dd6a408a2..381e4ae5e03 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -77,7 +77,7 @@ sub from_fh {
chomp($line);
# we call tllog only when something will be logged, to speed things up.
# this is the inner loop bounding the time to read tlpdb.
- ddebug("reading line: >>>$line<<<\n");
+ ddebug("reading line: >>>$line<<<\n") if ($::opt_verbosity >= 2);
$line =~ /^\s*#/ && next; # skip comment lines
if ($line =~ /^\s*$/o) {
if (!$started) { next; }
@@ -113,10 +113,13 @@ sub from_fh {
push @{$self->{$1."files"}}, "$2";
next;
} elsif ($line =~ /^docfilescontinued\s+(.*)\s*/o) {
- # docfiles can have tags
- my @words = &TeXLive::TLUtils::quotewords('\s+', 0, "$1");
- # the first entry is the file
- my $f = shift @words;
+ # docfiles can have tags, but the quotewords function is so
+ # time intense that we try to call it only when necessary
+ my ($f, $rest) = split(' ', "$1", 2);
+ my @words;
+ if (defined $rest) {
+ @words = &TeXLive::TLUtils::quotewords('\s+', 0, "$rest");
+ }
push @{$self->{'docfiles'}}, $f;
while (@words) {
$_ = shift @words;