Using fontspec (which requires exp3-code.tex) makes lualatex slow











up vote
0
down vote

favorite












I recently tried luatex (TeX Live on Mac) and found that if I use fontspec to load a font, it really slows down the compilation. My test document:



documentclass{article}

% usepackage{fontspec}
% setmainfont{ProximaNova}[
% Path=fonts/,
% UprightFont=*-Regular,
% ItalicFont=*-RegularIt,
% BoldFont=*-Bold,
% BoldItalicFont=*-BoldIt]

begin{document}
Hello World.
end{document}


If I keep the font section commented out, it takes 0.7 seconds to generate the PDF. If I uncomment the font section, it takes 2.7 seconds. That's almost 4x.



A huge chunk of this 2 sec increase seems to be processing expl3-code.tex which someone else complained about also.



Can this file be pre-compiled or something else to make it load faster?










share|improve this question







New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
    – Joseph Wright
    Nov 18 at 15:50










  • The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
    – Ulrike Fischer
    Nov 18 at 16:02










  • @DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
    – Roxy
    Nov 18 at 16:05










  • @Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
    – Joseph Wright
    Nov 18 at 16:07















up vote
0
down vote

favorite












I recently tried luatex (TeX Live on Mac) and found that if I use fontspec to load a font, it really slows down the compilation. My test document:



documentclass{article}

% usepackage{fontspec}
% setmainfont{ProximaNova}[
% Path=fonts/,
% UprightFont=*-Regular,
% ItalicFont=*-RegularIt,
% BoldFont=*-Bold,
% BoldItalicFont=*-BoldIt]

begin{document}
Hello World.
end{document}


If I keep the font section commented out, it takes 0.7 seconds to generate the PDF. If I uncomment the font section, it takes 2.7 seconds. That's almost 4x.



A huge chunk of this 2 sec increase seems to be processing expl3-code.tex which someone else complained about also.



Can this file be pre-compiled or something else to make it load faster?










share|improve this question







New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
    – Joseph Wright
    Nov 18 at 15:50










  • The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
    – Ulrike Fischer
    Nov 18 at 16:02










  • @DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
    – Roxy
    Nov 18 at 16:05










  • @Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
    – Joseph Wright
    Nov 18 at 16:07













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I recently tried luatex (TeX Live on Mac) and found that if I use fontspec to load a font, it really slows down the compilation. My test document:



documentclass{article}

% usepackage{fontspec}
% setmainfont{ProximaNova}[
% Path=fonts/,
% UprightFont=*-Regular,
% ItalicFont=*-RegularIt,
% BoldFont=*-Bold,
% BoldItalicFont=*-BoldIt]

begin{document}
Hello World.
end{document}


If I keep the font section commented out, it takes 0.7 seconds to generate the PDF. If I uncomment the font section, it takes 2.7 seconds. That's almost 4x.



A huge chunk of this 2 sec increase seems to be processing expl3-code.tex which someone else complained about also.



Can this file be pre-compiled or something else to make it load faster?










share|improve this question







New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I recently tried luatex (TeX Live on Mac) and found that if I use fontspec to load a font, it really slows down the compilation. My test document:



documentclass{article}

% usepackage{fontspec}
% setmainfont{ProximaNova}[
% Path=fonts/,
% UprightFont=*-Regular,
% ItalicFont=*-RegularIt,
% BoldFont=*-Bold,
% BoldItalicFont=*-BoldIt]

begin{document}
Hello World.
end{document}


If I keep the font section commented out, it takes 0.7 seconds to generate the PDF. If I uncomment the font section, it takes 2.7 seconds. That's almost 4x.



A huge chunk of this 2 sec increase seems to be processing expl3-code.tex which someone else complained about also.



Can this file be pre-compiled or something else to make it load faster?







luatex fontspec






share|improve this question







New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 18 at 15:43









Roxy

2353




2353




New contributor




Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Roxy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
    – Joseph Wright
    Nov 18 at 15:50










  • The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
    – Ulrike Fischer
    Nov 18 at 16:02










  • @DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
    – Roxy
    Nov 18 at 16:05










  • @Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
    – Joseph Wright
    Nov 18 at 16:07


















  • As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
    – Joseph Wright
    Nov 18 at 15:50










  • The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
    – Ulrike Fischer
    Nov 18 at 16:02










  • @DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
    – Roxy
    Nov 18 at 16:05










  • @Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
    – Joseph Wright
    Nov 18 at 16:07
















As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
– Joseph Wright
Nov 18 at 15:50




As the question you link to notes, expl3 is quite large, but on most systems the load time is pretty trivial (certainly less than a second). Other than building stuff into the format file there's not much that can be done to load material faster.
– Joseph Wright
Nov 18 at 15:50












The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
– Ulrike Fischer
Nov 18 at 16:02




The complain about expl3 in the other question was a bug in miktex which has been resolved in the meantime. lualatex is slower than pdflatex - loading rather large fonts needs more time.
– Ulrike Fischer
Nov 18 at 16:02












@DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
– Roxy
Nov 18 at 16:05




@DavidCarlisle With usepackage{expl3} it takes 2.2 seconds, which is 80% of the time increase.
– Roxy
Nov 18 at 16:05












@Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
– Joseph Wright
Nov 18 at 16:07




@Roxy Sure, but from a very low base. With LuaTeX, we have a load of Unicode data needed that's not in pdfTeX (where the load time is really low). It's very hard to cut that down, as I said unless we went down the route of building expl3 directly into the LaTeX kernel. That has been discussed, but there are issues with doing that globally ...
– Joseph Wright
Nov 18 at 16:07















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Roxy is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460609%2fusing-fontspec-which-requires-exp3-code-tex-makes-lualatex-slow%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Roxy is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Roxy is a new contributor. Be nice, and check out our Code of Conduct.













Roxy is a new contributor. Be nice, and check out our Code of Conduct.












Roxy is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460609%2fusing-fontspec-which-requires-exp3-code-tex-makes-lualatex-slow%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?