summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev/tlpdb-read-test
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-16 18:27:55 +0000
committerKarl Berry <karl@freefriends.org>2011-05-16 18:27:55 +0000
commit417e91d078352571aefe2bffd3cc2c1e5cc08f60 (patch)
tree5ff0763cb3062bb1527744c0a3e989d72a5ea7dd /Master/tlpkg/dev/tlpdb-read-test
parent7e20b5c1b0433cf03f5a823a225eb847df52bb65 (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/dev/tlpdb-read-test')
-rwxr-xr-xMaster/tlpkg/dev/tlpdb-read-test18
1 files changed, 18 insertions, 0 deletions
diff --git a/Master/tlpkg/dev/tlpdb-read-test b/Master/tlpkg/dev/tlpdb-read-test
new file mode 100755
index 00000000000..30ac0d05b15
--- /dev/null
+++ b/Master/tlpkg/dev/tlpdb-read-test
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+# Public domain. (Originally written by Karl Berry, 2011.)
+# This script does nothing but read TLPDB so we can work
+# on optimizing the inner loop, TLPOBJ::from_fh.
+
+our $mydir;
+
+BEGIN {
+ $^W = 1;
+ ($mydir = $0) =~ s,/[^/]*$,,;
+ unshift (@INC, "$mydir/..");
+}
+
+use strict;
+use TeXLive::TLPDB;
+
+chomp (my $Master = `cd $mydir/../.. && pwd`);
+my $tlpdb = TeXLive::TLPDB->new ("root" => $Master);