惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
L
LangChain Blog
Jina AI
Jina AI
爱范儿
爱范儿
C
Check Point Blog
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
月光博客
月光博客
GbyAI
GbyAI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Stack Overflow Blog
Stack Overflow Blog
V
V2EX
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
Why Did XeLaTeX Suddenly Run Insanely Slow?
2017-03-06 · via jdhao's digital space

Today I found that compiling LaTeX source is insanely slow(took me several minutes to compile a simple file). After a lot of trial and error, I found the reason.

The problem description#

I was trying to compile a tex file on my Windows 8.1 machine and observed that the compilation speed was insanely slow. I created a test file with only a few Chinese character and compiled it. The compilation time is around 1.15 minutes. At first, I thought it was probably due to the Chinese character. So I replaced the Chinese character with simple English words. After that, I recompiled the file, but found no noticeable speedup in compilation time. The follwing is my testing code:

\documentclass{article}
\usepackage{xeCJK}
\begin{document}
测试 % change the Chinese character to English does not make a difference
\end{document}

If I comment out \usepackage{xeCJK}, the compilation process also sped up.

The solution#

After some search on the Internet, I found a relevant post on the Stack Exchange. It turned out that it was caused by a new install of font. After a font is installed or removed, we should manually run fc-cache -f from command line to rebuild the TeX Live font cache. After this rebuilding process, compiling files with xelatex should be normal again.


References#