LaTeX Lazy Loading with LaTeX - Performance and UX

  • Thread starter Thread starter Greg Bernhardt
  • Start date Start date
AI Thread Summary
A lazy load extension for MathJax has been developed to improve performance on pages heavy with equations by rendering them only when they enter the viewport. Users have reported issues with rendering inconsistencies across different devices and browsers, including problems with navigation links jumping unexpectedly. Some users experienced complete failures in LaTeX rendering, which were resolved by clearing their browser cache. There are ongoing discussions about the user experience and performance improvements, with developers planning to refine the extension for an official release. Overall, the community is actively sharing feedback on these rendering challenges and potential solutions.
Messages
19,773
Reaction score
10,726
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
Physics news on Phys.org
I noticed in a PM that the it didn’t render at all but when my post was quoted it did.

##(r, \theta, \phi)##
 
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
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?
 
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.
 
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.
 
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.
 
  • Like
Likes weirdoguy
Clearing browser cache helped. Thanks!
 
  • Like
Likes Greg Bernhardt
  • #10
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

Similar threads

Replies
3
Views
2K
Replies
48
Views
66K
Replies
1
Views
10K
Replies
5
Views
3K
Back
Top