Speed Up Latex on Physics Website in Poland

  • Context: LaTeX 
  • Thread starter Thread starter fizyka
  • Start date Start date
  • Tags Tags
    Latex Physics
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
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.