Speed Up Latex on Physics Website in Poland

  • Context: LaTeX 
  • Thread starter Thread starter fizyka
  • Start date Start date
  • Tags Tags
    Latex Physics
Click For Summary

Discussion Overview

The discussion revolves around the performance of LaTeX rendering on a physics website in Poland. Participants explore methods to speed up the loading times of mathematical formulas displayed on the site, considering both technical solutions and alternative tools.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that LaTeX rendering appears slow and seeks advice on improving performance.
  • Another participant suggests that the perceived slowness may stem from generating PNG images for each formula on-the-fly, recommending pre-generating these images instead.
  • A different viewpoint expresses skepticism about the formulas being the main issue, proposing that server response times and HTML generation might be the actual bottleneck, and suggests implementing caching and Expires headers.
  • One participant introduces MathJax as an alternative to CodeCogs, claiming it is faster and more efficient for rendering mathematical content.

Areas of Agreement / Disagreement

Participants express differing opinions on the source of the slowness, with some attributing it to LaTeX rendering while others suggest server performance issues. There is no consensus on the best solution, as multiple approaches are proposed.

Contextual Notes

Some assumptions about server performance and the specifics of LaTeX rendering methods are not fully explored, leaving potential gaps in understanding the overall performance issues.

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 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 5 ·
Replies
5
Views
34K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K