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
biberreally that much slower thanbibtex - Can I do anything to still use
biberbut decrease compiling time? - It seems that it is not the
biberrun itself, that makes compilation slow, but usingbackend=biberslows 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
.bibfile (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.texOutput written on Diss.pdf (95 pages, 2453607 bytes).
real 4m7.708s
user 3m27.864s
sys 0m1.029sagain
pdflatex Diss.texOutput written on Diss.pdf (95 pages, 2452370 bytes). real 4m33.769s user 3m36.491s sys 0m1.252s
with bibtex8
- remove all
auxandbblfiles 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?
pdflatexrun significantly longer though (sure, if you use BibTeX you cannot use all of Biber's features and we loadbiblatex1.styand 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 forpdflatexto write out). – moewe Mar 01 '15 at 16:33.bibfile, but only the ones you actually cite.5.6MBis quite hefty. - Though Biber only really processes entries if they are cited, so the performance gain might be quite small. – moewe Mar 01 '15 at 16:36pdflatexrun in most cases, only doing the additional stuff when required. – cfr Mar 01 '15 at 16:44latexmk. – cfr Mar 01 '15 at 16:44auctexand often compile only the current region to check if I did not add new mistakes with my edit, but that still felt painfully slow suddenly, so I tried to find the root cause. – MostlyHarmless Mar 01 '15 at 16:46biber --output_format=bibtex fileshould give you a.bibfile with only the cited entries. If you have time you could try and replicate your problem withbiblatex-examples.bib(comes withbiblatexand is automatically found by LaTeX) and some blind text, so you don't have to upload sensitive things. – moewe Mar 01 '15 at 16:52.bcf, but only some lines in the aux and a small bib when in bibtex mode. Btw:.bblis not a log-file, it is your bib prepared for pdflatex. – Ulrike Fischer Mar 02 '15 at 09:18draftoption for biblatex to speed up compilation. – Jonas Nyrup Mar 02 '15 at 09:39biberis slower thanbibtex, but I'll ask him about this question here. However it would help me a lot if other people could repeat my "benchmark" on their hardware to see how much time it takes on a recent computer. – MostlyHarmless Apr 23 '15 at 19:30biblatex-example.bib, a compilation with Biber is only about 60% slower than with BibTeX, not the orders of magnitude that were being discussed. – ShreevatsaR Jan 03 '20 at 23:08