Since I am using biber, the compilation time for my document has increased dramatically.
It's a dissertation with <300 pages and a full latexmk
compilation suddenly needed 26 minutes which is not acceptable IMHO.
I already read, that biber
might be slower than bibtex
(see https://tex.stackexchange.com/a/53302/4009), but can it really make such a difference?
I already described the problem here (https://tex.stackexchange.com/a/230749/4009 ) and narrowed the problem down to biber
which seems to have a large impact on compiling time.
I use the following biblatex setup:
\usepackage[natbib=true, style=numeric-comp, backend=biber,
defernumbers,useprefix,firstinits=true, maxnames=99, maxcitenames=3]{biblatex}
My question
- Is
biber
really that much slower thanbibtex
- Can I do anything to still use
biber
but decrease compiling time? - It seems that it is not the
biber
run itself, that makes compilation slow, but usingbackend=biber
slows down pdflatex a lot - can I use other options (kind of a draft mode) to speed up biber and only use the slow compilation for the final versions?
Unfortunately, I've switched all my input files (.tex
, .bib
) to UTF-8 encoding, as I head problems with exotic characters and it seems to me there is no easy way back to the good old latin1
times. And it seems, that UTF8 requires the biber backend.
Test setup
- my LaTeX document, limited to one long chapter by
\includeonly
, - 98 pages with many many references, many of them in large tables.
- large
.bib
file (5.6 MB) with >3000 references, 350 of them cited in the document - I'm compiling from OS X terminal to measure the duration of the compilation:
latexmk -C; time pdflatex main.tex
Test results
with biber:
- biber cache removed once with
rm -rf `biber --cache`
latexmk -C; time pdflatex Diss.tex
Output written on Diss.pdf (83 pages, 2130562 bytes).
real 2m17.499s
user 1m47.626s
sys 0m1.030sbiber Diss
real 0m27.257s
user 0m20.568s
sys 0m1.247spdflatex Diss.tex
Output written on Diss.pdf (95 pages, 2453607 bytes).
real 4m7.708s
user 3m27.864s
sys 0m1.029sagain
pdflatex Diss.tex
Output written on Diss.pdf (95 pages, 2452370 bytes). real 4m33.769s user 3m36.491s sys 0m1.252s
with bibtex8
- remove all
aux
andbbl
files etc. latexmk -C; time pdflatex Diss.tex
Output written on Diss.pdf (82 pages, 2130383 bytes).
real 0m48.470s
user 0m19.161s
sys 0m0.522s- time
bibtex Diss
(There were 200 error messages) sure :-(
real 0m1.258s
user 0m0.850s
sys 0m0.061s time
pdflatex Diss.tex
Output written on Diss.pdf (95 pages, 2452225 bytes).
real 2m26.433s
user 1m44.921s
sys 0m0.932ssecond
pdflatex Diss.tex
Output written on Diss.pdf (95 pages, 2450936 bytes).
real 2m27.148s
user 1m51.958s
sys 0m0.953s
My .biber.conf
path: ~/.biber.conf
<config>
<sourcemap>
<maps datatype="bibtex" map_overwrite="1">
<map>
<map_step map_field_set="Annote" map_null="1"/>
<map_step map_field_set="Abstract" map_null="1"/>
<map_step map_field_set="Keywords" map_null="1"/>
<map_step map_field_set="comment" map_null="1"/>
</map>
</maps>
</sourcemap>
</config>
- Is this ok?
- Are the field names case sensitive?
- is something missing here?
Test 2 with example document
I set up an example document using the biblatex-example.bib
file included in TeXLive 2014
. For details please see my answer below , as it seems to crash the question, if I insert that much text here.
The sample document compiles 80% faster with bibtex
!
Maybe you want to try it on your machine and see how long it takes?
pdflatex
run significantly longer though (sure, if you use BibTeX you cannot use all of Biber's features and we loadbiblatex1.sty
and notbiblatex2.sty
). But I doubt that we can actually comparepdflatex
's compile times here since due to the errors you don't get the same output (probably a lot of entries are skipped - less forpdflatex
to write out).biber --output_format=bibtex file
should give you a.bib
file with only the cited entries. If you have time you could try and replicate your problem withbiblatex-examples.bib
(comes withbiblatex
and is automatically found by LaTeX) and some blind text, so you don't have to upload sensitive things.