LaTeX now lazy loading

  • #1
18,426
8,264
To help with performance on threads heavy with equations I got the MathJax dev to create a lazy load extension that only renders the equations if it enters your viewport instead of rendering everything on page load. At the moment it can be a little choppy. The MathJax devs said they'll work on polishing it up for an official release sometime this summer. Let me know your thoughts on the performance improvement and user experience.
 
  • Like
Likes Twigg, DrClaude, Wrichik Basu and 4 others

Answers and Replies

  • #2
12,826
6,703
I noticed in a PM that the it didn’t render at all but when my post was quoted it did.

##(r, \theta, \phi)##
 
  • #3
12,826
6,703
The post above renders the r, theta, phi expression in portrait mode in Safari on my iPad but only renders the bottom half When in landscape mode.
 
  • Like
Likes Greg Bernhardt
  • #4
Ibix
Science Advisor
Insights Author
2020 Award
7,883
7,150
I'm finding (Android Firefox) that sometimes links to posts part way down a LaTeX-heavy page don't go to the top of the post now. For example, this post by sophiatev initially opens at the top, but when the LaTeX renders it jumps to halfway down the post.

I note that she's quoted a lot of LaTeX. Did the stuff she quoted get rendered in the post she quoted it from too or something?
 
  • #5
Tom.G
Science Advisor
3,890
2,590
Slightly different action here. (Very old Firefox, 43.0.1 on Win XP)

Opens at top
Jumps (part? way) down
Then IMMEDIATELY jumps back to top

A page reload (F5) causes a jump to show the last few lines of the preceeding post for about 1/4 second, then back to top of selected post.

Most curious.

Further trials show suspicion of a local buffering situation. The first anomaly is dependent on the elapsed time between trials.

Arrgh! Now the 1st anomaly has been replaced with the 2nd one.

I give up! Good Luck.
 
  • #6
18,426
8,264
I've made a conditional so that if equations aren't found on the page, it won't load the mathjax resource. Let me know if anyone is seeing rendering issues.
 
  • #7
Since today, PF Latex formulas are not rendered at all on my PC, in all postings. I tried Firefox (v 89,0, Java script enabled) and Edge (v 91.0.864.41). Both show this issue.
 
  • #10
Wrichik Basu
Insights Author
Gold Member
2020 Award
1,741
1,573
I am trying to write a new thread in the Other Physics Topics section, and after writing some LaTeX, when I am clicking on Preview, the equations are not rendered, likely because the MathJax resource is not loaded:

1623932856219.png


Now, suppose I save the draft, go to some other page, and again come back to the New Thread editor. I find that LaTeX has been rendered even though I have not selected the preview option:

1623932907781.png


In this situation, if I click on the Preview button, it becomes a mess:

1623932967815.png
 
Last edited:
  • Informative
Likes Greg Bernhardt

Related Threads on LaTeX now lazy loading

  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
4
Views
643
  • Last Post
2
Replies
25
Views
4K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
9
Views
530
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
2
Views
582
  • Last Post
Replies
4
Views
279
  • Last Post
Replies
5
Views
3K
Top