LaTeX Speed Up Latex on Physics Website in Poland

  • Thread starter Thread starter fizyka
  • Start date Start date
  • Tags Tags
    Latex Physics
AI Thread Summary
The discussion focuses on improving the speed of LaTeX rendering on a physics website in Poland. Users suggest that the slow performance may stem from generating PNG images for each formula on-the-fly, recommending pre-generating these images instead. Concerns are raised about overall server response times, indicating that the HTML generation may be the real issue rather than LaTeX itself. Caching static HTML and implementing Expires headers for images are proposed as potential solutions. Additionally, MathJax is mentioned as a faster alternative to CodeCogs for rendering formulas.
fizyka
Messages
1
Reaction score
0
Hello everyone
You see I create a small website about physics in my country, Poland...
And I have one page where pattern are (you now - formulas, in polish wzory)..
I use latex as You use on Your page... The only thing is that latex is very very slow...
http://fizyka.dk/tablice/wzory/wzory-liceum-i-gimnazjum-karta-wzorow"

Please, could You tell me how to speed up latex?
 
Last edited by a moderator:
Physics news on Phys.org
First off, it didn't seem that slow to me.

I think what your site is doing is generating PNG images for each formula when someone loads it. You might as well pregenerate these images and simple put them on your website. For example your first formula is here:
http://latex.codecogs.com/png.latex?\150dpi v_{sr}=\frac{\Delta{S}}{\Delta{t}}"

Save that image and then just replace whatever code you are using to generate the formulas with it.
 
Last edited by a moderator:
I expect that CodeCogs caches the images themselves, so you don't have to worry about doing it.

Actually, if you're worried about long loading times, I doubt that the formulas are the problem. I'd be more concerned with the time it takes your server to create the HTML itself - on my computer it takes 2-4 seconds between the time my browser sends the request and the time the page starts to render. That's kind of on the long side. So I'd suggest looking into caching the static HTML of your page. Also, add Expires headers to your images.
 
This forum uses MathJax (http://www.mathjax.org/) rather than CodeCogs.
MathJax seems to be much faster and more efficient.
 

Similar threads

Replies
4
Views
2K
Replies
4
Views
3K
Replies
20
Views
3K
Replies
7
Views
4K
Replies
4
Views
2K
Replies
3
Views
2K
Replies
4
Views
4K
Replies
5
Views
33K
Replies
4
Views
3K
Back
Top