type
Post
status
Published
date
Mar 1, 2023
slug
summary
mac比windows慢一倍?
tags
LaTex
lilypond
lyluatex
category
探索新世界
icon
password
前因后果都在这了
简单的来说就是
我发现在mac上使用lyluatex的速度还不如在windows上的速度,甚至慢了一倍左右。
开发者非常友好,很细节的帮我找问题。

lilypond-book

提到这个的原因是,想看看是lilypond有问题,还是出在别的方面。
lilypond-book速度非常的快,指的是从lytex生成tex文件。
那么编译tex的时候就出鬼了,如果使用xelatex的话,速度还是相当快的,基本上几十秒就搞定了。但是如果使用lualatex的话就非常的缓慢,跟使用lyluatex的时候差不多。

lyluatex生成tmp-ly

调用lyluatex对新文件进行编译的时候,会在当前目录下生成一个tmp-ly文件。这个文件下面装的是以hash为文件名的相关pdf等文件。等第二次或者接下来编译的时候,就会明显的缩短时间,因为不需要再次生成。
事实上确实是这样。但就是生成tmp-ly文件的时候速度太慢了。
开发者猜想lilypond-book是多线程的,而lyluatex是跟据lyluatex的上下文按顺序来的,所以不能多线程。

解决方案

所以lilypond-book的快是必然的,同样的效果也要差一些。
lyluatex如果想要快,按作者的话说
I’d ensure that the binaries (from MacTeX and from LilyPond) are compiled natively for m2, not "universal" binaries. Otherwise, the only thing I see is avoiding to many changes on scores, so that the tmp-lycache shows its benefits…
 
反正我已经是被搞晕了,再说吧,用反正是可以用。
 
一个比较好用的notion api封装部署Ecover的记录