# Slow compilation without sudo [closed]

With any *.tex file, even with almost empty template, tex, latex, pdflatex commands takes ages to compile it. strace shows excessive amount of stat calls to all the files in my home directory, which is the cause of slow behaviour. If I run a compilation with sudo command all fine and quick as it supposed to be. How can I fix this?

strace output consists of many many lines like this:

stat("/home/...", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/home/...", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
getdents(8, /* 7 entries */, 32768)     = 208
close(8)


EDIT: I'm using RHEL 6

env | grep TEX

kpsewhich -a texmf.cnf

/usr/share/texmf/web2c/texmf.cnf

kpsewhich -var-value=TEXINPUTS

• Can you add the output of the shell commands env | grep TEX and kpsewhich -a texmf.cnf (as normal user)? – egreg Jun 8 '15 at 11:58