calvinkei / react-native-mathjax

Render Mathjax content in React Native Webview
MIT License
34 stars 37 forks source link

rendering is taking too much time #1

Closed deepakverma4 closed 6 years ago

deepakverma4 commented 6 years ago

I am using mathjax with my react-native quiz application. But it is taking too much time in loading the question with all four options and downgrading the performance of application. I tried putting loader when webview loads but loader stays only untill the webview loads and rending of mathematical questions still takes more time to display. Any way by which we can reduce the rendering time or put a loader/activity indicator on rending too?

calvinkei commented 6 years ago

Hi @dverma4u , I am using this component for the exact same purpose (a multiple choice quiz app with a question and 4 options, and step-by-step solutions, ie 6 mathjax webview to be displayed at the same time) and seems do not have the performance issue you mentioned. It is loaded within 1s like ordinary mathjax in web. Would you mind providing some metrics? Like how long does it take to load and what device are you using?

deepakverma4 commented 6 years ago

It is taking around 5-6 seconds for everything to be loaded. Please help me in reducing this time lag.

deepakverma4 commented 6 years ago

can you please share the quiz app demo? how you are implementing mathJax? Actually I'm only usong the wrapMathkax function from your example app with react-native-webview-autoheight because react-native-autoheight-webview was causing some unresolved error.

calvinkei commented 6 years ago

Just fixed some bugs on this module and added demo code on it. it loads almost instantly on my iphone 6 simulator. Please check

deepakverma4 commented 6 years ago

yes, in real device it loads instantly, maybe the issue is with my android emulator.

mahesh-vidhate commented 5 years ago

I am facing this same issue on my android device. It is taking almost 15 seconds to load the content. Please help

anuragnagarkota commented 4 years ago

I am also facing the same problem.... I guess it is due to the cdn file which is requested every time the webview renders. Is there any way to use the local mathjax lib instead of cdn