Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "native" bbcode system #1

Closed
sergio91pt opened this issue Jul 11, 2011 · 1 comment
Closed

Use "native" bbcode system #1

sergio91pt opened this issue Jul 11, 2011 · 1 comment
Assignees
Milestone

Comments

@sergio91pt
Copy link
Owner

Fixes:

  • Drop pre-processors, which does unnecessary parsing on the whole page.
  • Trivially honors global and per post $allow_bbcode
  • No more LaTeX where its not supposed to be (eg. in topic title)

Requires:

  • Only bbcodes parsed by phpbb are "feeded" into Mathjax Queue
  • Latex code should be unescaped via javascript to avoid XSS attacks and then feeded to the queue. (done)

Problems:

  • How to mark valid parsed bbcodes to unescape/push to the Queue?
    • The queue proccess only html id'ed entities?? So... unescaping?!?
    • Add a javascript "compatibility layer" to solve the integration: looks for some class and add the ids?
  • Is the bbcode db method sufficient for this? Or do I need to HardCode it?
@ghost ghost assigned sergio91pt Jul 11, 2011
@sergio91pt
Copy link
Owner Author

I made some performance tests, with chrome built-in tools, and it seems its faster to load the TeX-AMS-MML_HTMLorMML config file and disable the pre-processors than just load what its needed, on average an extra 150ms till all AJAXed files are loaded (worst case around 400ms if un-cached).

This happens because the config file as the extensions concatenated saving around 17 HTTP/AJAX requests, making the extra overhead a very acceptable trade-off, so I changed back the header to use a config file instead of a config block with AJAX calls.

To achieve max performance, one can delete, on the minified config file, the lines that mention tex2jax and mml2jax. Doing so practically saves was 2Kb as shown in the chromium web-tools (gzip compression?), but in raw disk space the difference is 9.2Kb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant