diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-16 18:27:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-16 18:27:55 +0000 |
commit | 417e91d078352571aefe2bffd3cc2c1e5cc08f60 (patch) | |
tree | 5ff0763cb3062bb1527744c0a3e989d72a5ea7dd /Master/tlpkg/TeXLive/TLPOBJ.pm | |
parent | 7e20b5c1b0433cf03f5a823a225eb847df52bb65 (diff) |
TLPOBJ.pm (from_fh): do not remove trailing whitespace; turns out this
takes consequential time, and the creation programs should not ever
produce it. Also added trailing-whitespace check to cron job for master
tlpdb creation. With this change, tlpdb-read-test time is reduced from
~2.4sec to ~1.2sec.
TeXCatalogue.pm (beautify): remove trailing whitespace. Looks like this
can matter in <caption>s which we turn into shortdescs, but nowhere else.
dev/tlpdb-read-test: trivial test script to read tlpdb and nothing else.
git-svn-id: svn://tug.org/texlive/trunk@22498 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index b73ee0e3cff..9713c87b90a 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -83,7 +83,11 @@ sub from_fh { my $size; while (my $line = <$fh>) { + # we do not worry about whitespace at the end of a line; + # that would be a bug in the db creation, and it takes some + # noticeable time to get rid of it. So just chomp. 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. dddebug("reading line: >>>$line<<<\n") if ($::opt_verbosity >= 3); @@ -111,8 +115,7 @@ sub from_fh { die("Continuation of $lastcmd not allowed, please fix tlpobj: line = $line!\n"); } } - # remove white space at the end of a line - $line =~ s/\s*$//; + if ($line =~ /^name\s*([-.\w]+)/o) { $name = "$1"; $lastcmd = "name"; |