Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Latex is dead-slow
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
and3k
n00b
n00b


Joined: 12 May 2006
Posts: 14

PostPosted: Wed Apr 09, 2008 5:56 pm    Post subject: [solved] Latex is dead-slow Reply with quote

When I use pdflatex (or latex or tex) to compile a small tex file it needs 5-6 minutes. A friend of mine tried the same file and it took only a few seconds. Latex also needs about 3 minutes to notice if a give him a file, that doesn't exists:

Code:
$ time pdflatex bsp1.tex
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
! I can't find file `bsp1.tex'.
<*> bsp1.tex

Please type another input file name:

real    3m2.463s
user    1m31.570s
sys     0m23.515s


Something is very wrong here?! But I have no idea what or how to debug this??? Someone help me please :)

I have texlive 2007

Code:
and ~ # eix -e texlive
[I] app-text/texlive
     Available versions:  (~)2007-r3 {X cjk context cyrillic doc extra games graphics humanities jadetex linguas_af linguas_ar linguas_bg linguas_bn linguas_bo linguas_cs linguas_cy linguas_da linguas_de linguas_el linguas_en linguas_en_GB linguas_eo linguas_es linguas_et linguas_fi linguas_fr linguas_he linguas_hi linguas_hr linguas_hsb linguas_hu linguas_hy linguas_id linguas_is linguas_it linguas_ja linguas_ko linguas_la linguas_ml linguas_mn linguas_nl linguas_no linguas_pl linguas_pt linguas_ro linguas_ru linguas_sk linguas_sl linguas_sr linguas_sv linguas_ta linguas_th linguas_tr linguas_uk linguas_vi linguas_zh music omega png pstricks publishers science tex4ht xetex xml}
     Installed versions:  2007-r3(17:13:40 2008-04-06)(X extra graphics humanities linguas_de linguas_en linguas_en_GB omega png pstricks publishers science xml -cjk -context -cyrillic -doc -games -jadetex -linguas_af -linguas_ar -linguas_bg -linguas_bn -linguas_bo -linguas_cs -linguas_cy -linguas_da -linguas_el -linguas_eo -linguas_es -linguas_et -linguas_fi -linguas_fr -linguas_he -linguas_hi -linguas_hr -linguas_hsb -linguas_hu -linguas_hy -linguas_id -linguas_is -linguas_it -linguas_ja -linguas_ko -linguas_la -linguas_ml -linguas_mn -linguas_nl -linguas_no -linguas_pl -linguas_pt -linguas_ro -linguas_ru -linguas_sk -linguas_sl -linguas_sr -linguas_sv -linguas_ta -linguas_th -linguas_tr -linguas_uk -linguas_vi -linguas_zh -music -tex4ht -xetex)
     Homepage:            http://tug.org/texlive/
     Description:         A complete TeX distribution


Last edited by and3k on Wed Apr 09, 2008 7:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
dleverton
Guru
Guru


Joined: 28 Aug 2006
Posts: 517

PostPosted: Wed Apr 09, 2008 6:31 pm    Post subject: Reply with quote

Try
Code:
strace -rT pdflatex bsp1.tex
(dev-util/strace if you don't have it already) and post the output somewhere. If it's long, either use a pastebin, or just post the part around where it's slow.
Back to top
View user's profile Send private message
and3k
n00b
n00b


Joined: 12 May 2006
Posts: 14

PostPosted: Wed Apr 09, 2008 6:51 pm    Post subject: Reply with quote

Code:
bela@and /home/bela $ strace pdflatex
execve("/usr/bin/pdflatex", ["pdflatex"], [/* 89 vars */]) = 0
brk(0)                                  = 0x7ee000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ff55e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ff55f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=243571, ...}) = 0
mmap(NULL, 243571, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b14ff560000
close(3)                                = 0
open("/usr/lib/libpng12.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320M\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=150312, ...}) = 0
mmap(NULL, 2245600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b14ff75f000
mprotect(0x2b14ff783000, 2093056, PROT_NONE) = 0
mmap(0x2b14ff982000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x2b14ff982000
close(3)                                = 0
open("/lib/libz.so.1", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\35\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=84272, ...}) = 0
mmap(NULL, 2179560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b14ff984000
mprotect(0x2b14ff998000, 2093056, PROT_NONE) = 0
mmap(0x2b14ffb97000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x2b14ffb97000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340>\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=518280, ...}) = 0
mmap(NULL, 2613480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b14ffb99000
mprotect(0x2b14ffc17000, 2093056, PROT_NONE) = 0
mmap(0x2b14ffe16000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7d000) = 0x2b14ffe16000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\343\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1330320, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ffe18000
mmap(NULL, 3437016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b14ffe19000
mprotect(0x2b14fff57000, 2097152, PROT_NONE) = 0
mmap(0x2b1500157000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e000) = 0x2b1500157000
mmap(0x2b150015c000, 16856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b150015c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b1500161000
arch_prctl(ARCH_SET_FS, 0x2b1500161700) = 0
mprotect(0x2b1500157000, 16384, PROT_READ) = 0
mprotect(0x2b14ffe16000, 4096, PROT_READ) = 0
mprotect(0x2b14ffb97000, 4096, PROT_READ) = 0
mprotect(0x2b14ff982000, 4096, PROT_READ) = 0
mprotect(0x719000, 8192, PROT_READ)     = 0
mprotect(0x2b14ff75d000, 4096, PROT_READ) = 0
munmap(0x2b14ff560000, 243571)          = 0
brk(0)                                  = 0x7ee000
brk(0x80f000)                           = 0x80f000
stat("/usr/local/bin/pdflatex", 0x7fffab564760) = -1 ENOENT (No such file or directory)
stat("/usr/bin/pdflatex", {st_mode=S_IFREG|0755, st_size=1312976, ...}) = 0
open("/usr/bin/pdflatex", O_RDONLY)     = 3
close(3)                                = 0
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=584, ...}) = 0
lstat("/usr/bin", {st_mode=S_IFDIR|0755, st_size=92152, ...}) = 0
lstat("/usr/bin/pdflatex", {st_mode=S_IFLNK|0777, st_size=6, ...}) = 0
readlink("/usr/bin/pdflatex", "pdftex", 2048) = 6
lstat("/usr/bin/pdftex", {st_mode=S_IFREG|0755, st_size=1312976, ...}) = 0
stat("/usr/bin", {st_mode=S_IFDIR|0755, st_size=92152, ...}) = 0
access("/usr/bin/texmf.cnf", R_OK)      = -1 ENOENT (No such file or directory)
stat("/usr", {st_mode=S_IFDIR|0755, st_size=584, ...}) = 0
access("/usr/texmf.cnf", R_OK)          = -1 ENOENT (No such file or directory)
stat("/", {st_mode=S_IFDIR|0755, st_size=592, ...}) = 0
access("/texmf.cnf", R_OK)              = -1 ENOENT (No such file or directory)
stat("/usr/bin/share/texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/share/texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("//share/texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("//texmf-local/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/share/texmf/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/share/texmf/web2c", {st_mode=S_IFDIR|0755, st_size=1256, ...}) = 0
access("/usr/share/texmf/web2c/texmf.cnf", R_OK) = 0
stat("/usr/share/texmf/web2c/texmf.cnf", {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
stat("//share/texmf/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/texmf/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("/usr/texmf/web2c", 0x7fffab5645e0) = -1 ENOENT (No such file or directory)
stat("//texmf/web2c", 0x7fffab5645e0)   = -1 ENOENT (No such file or directory)
stat("/.", {st_mode=S_IFDIR|0755, st_size=592, ...}) = 0
access("/./texmf.cnf", R_OK)            = -1 ENOENT (No such file or directory)
access("/usr/share/texmf/web2c/texmf.cnf", R_OK) = 0
stat("/usr/share/texmf/web2c/texmf.cnf", {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
access("/usr/share/texmf/web2c/texmf.cnf", R_OK) = 0
stat("/usr/share/texmf/web2c/texmf.cnf", {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
open("/usr/share/texmf/web2c/texmf.cnf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ff560000
read(3, "% texmf.cnf -- runtime path conf"..., 4096) = 4096
read(3, "or later, this must be set.\n% Fo"..., 4096) = 4096
read(3, "    = .;$TEXMF/tex/{jadetex,plai"..., 4096) = 4096
read(3, "1}//\nTEXPICTS.XDvi  = .;$TEXMF/%"..., 4096) = 4096
read(3, "NTS = .;{$TEXMF/fonts,$VARTEXFON"..., 4096) = 4096
read(3, "_mem_* only to non-ini.\n% Thus, "..., 4096) = 4096
read(3, "btex8 =             .;$TEXMF/bib"..., 4096) = 2563
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b14ff560000, 4096)            = 0
open("/usr/share/texmf/web2c/texmf.cnf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ff560000
read(3, "% texmf.cnf -- runtime path conf"..., 4096) = 4096
read(3, "or later, this must be set.\n% Fo"..., 4096) = 4096
read(3, "    = .;$TEXMF/tex/{jadetex,plai"..., 4096) = 4096
read(3, "1}//\nTEXPICTS.XDvi  = .;$TEXMF/%"..., 4096) = 4096
read(3, "NTS = .;{$TEXMF/fonts,$VARTEXFON"..., 4096) = 4096
read(3, "_mem_* only to non-ini.\n% Thus, "..., 4096) = 4096
read(3, "btex8 =             .;$TEXMF/bib"..., 4096) = 2563
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b14ff560000, 4096)            = 0
open("/usr/share/texmf/web2c/texmf.cnf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27139, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b14ff560000
read(3, "% texmf.cnf -- runtime path conf"..., 4096) = 4096
read(3, "or later, this must be set.\n% Fo"..., 4096) = 4096
read(3, "    = .;$TEXMF/tex/{jadetex,plai"..., 4096) = 4096
read(3, "1}//\nTEXPICTS.XDvi  = .;$TEXMF/%"..., 4096) = 4096
read(3, "NTS = .;{$TEXMF/fonts,$VARTEXFON"..., 4096) = 4096
read(3, "_mem_* only to non-ini.\n% Thus, "..., 4096) = 4096
read(3, "btex8 =             .;$TEXMF/bib"..., 4096) = 2563
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x2b14ff560000, 4096)            = 0
open("/home/bela/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 3
fstat(3, {st_mode=S_IFDIR|0700, st_size=4552, ...}) = 0
fcntl(3, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
stat("/home/bela/.texmf-config", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
getdents(3, /* 128 entries */, 4096)    = 4096
stat("/home/bela/ZDE", {st_mode=S_IFDIR|0755, st_size=136, ...}) = 0
stat("/home/bela/ZDE/.texmf-config", 0x7fffab5644d0) = -1 ENOENT (No such file or directory)
open("/home/bela/ZDE/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=136, ...}) = 0
stat("/home/bela/ZDE/.texmf-config", 0x7fffab564460) = -1 ENOENT (No such file or directory)
getdents(4, /* 5 entries */, 4096)      = 136
stat("/home/bela/ZDE/log", {st_mode=S_IFDIR|0755, st_size=72, ...}) = 0
stat("/home/bela/ZDE/log/.texmf-config", 0x7fffab564460) = -1 ENOENT (No such file or directory)
stat("/home/bela/ZDE/config_5.5", {st_mode=S_IFDIR|0755, st_size=840, ...}) = 0
stat("/home/bela/ZDE/config_5.5/.texmf-config", 0x7fffab564460) = -1 ENOENT (No such file or directory)
open("/home/bela/ZDE/config_5.5/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) = 5
fstat(5, {st_mode=S_IFDIR|0755, st_size=840, ...}) = 0
stat("/home/bela/ZDE/config_5.5/.texmf-config", 0x7fffab5643f0) = -1 ENOENT (No such file or directory)
getdents(5, /* 25 entries */, 4096)     = 912
stat("/home/bela/ZDE/config_5.5/ftp", {st_mode=S_IFDIR|0755, st_size=208, ...}) = 0
stat("/home/bela/ZDE/config_5.5/ftp/.texmf-config", 0x7fffab5643f0) = -1 ENOENT (No such file or directory)
stat("/home/bela/ZDE/config_5.5/sql", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
stat("/home/bela/ZDE/config_5.5/sql/.texmf-config", 0x7fffab5643f0) = -1 ENOENT (No such file or directory)
stat("/home/bela/ZDE/config_5.5/fileTypes", {st_mode=S_IFDIR|0755, st_size=448, ...}) = 0
stat("/home/bela/ZDE/config_5.5/fileTypes/.texmf-config", 0x7fffab5643f0) = -1 ENOENT (No such file or directory)
...

And now it looks for .texmf-config in ALL files in my home dir ... Thats the part that needs a lot of time ...

Hm ... apparently it only sucks for my user, with a different user everything is fine ...


Last edited by and3k on Wed Apr 09, 2008 6:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
dleverton
Guru
Guru


Joined: 28 Aug 2006
Posts: 517

PostPosted: Wed Apr 09, 2008 6:54 pm    Post subject: Reply with quote

There should be a block like
Code:
% TEXMFCONFIG, where texconfig stores configuration data.
% With teTeX-3.0 or later, this must be set.
% For sharing this tree with $TEXMFMAIN:
%   TEXMFCONFIG = $TEXMFMAIN
% For using a separate tree:
%   TEXMFCONFIG = $HOME/.texmf-config  # teTeX 3.0 default
% For using a separate tree:
%   TEXMFCONFIG = $SELFAUTOPARENT/texmf-config
TEXMFCONFIG = $HOME/.texmf-config
in /etc/texmf/texmf.d/05searchpaths.conf. Does yours look different?

EDIT: or does your $HOME variable end in a slash?
Back to top
View user's profile Send private message
and3k
n00b
n00b


Joined: 12 May 2006
Posts: 14

PostPosted: Wed Apr 09, 2008 6:59 pm    Post subject: Reply with quote

yes, $HOME has a slash at the end, without the slash everythings fine ..

thx!!! :)

where does that slash come from?

EDIT: OK, found it, its in /etc/passwd, Thanks again! :)
Back to top
View user's profile Send private message
ewg
n00b
n00b


Joined: 02 Aug 2005
Posts: 28

PostPosted: Fri Dec 12, 2008 8:41 am    Post subject: Reply with quote

Out of curiosity (and too lazy to dig into it myself): What is the reason for this behavior?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum