In my previous answer I focused on performance and how that negatively impacts users. The counter that keeps coming up it "why not just use it where you need it?". Okay, let's take a look, where is that?
- Questions that use it
- Lists of questions that involve questions that use it
- Related or linked questions that involve questions that have titles that use it
- Links in questions (remember, we put the titles inline) to questions that use it
- Searches that have question or answer results that use it
- ...and probably some more I'm forgetting
Questions that use it: How do we know?
Do we do a search on every title and body? To achieve proper performance we have to do this before rendering the header, or else the <script>
include is at the bottom of the page (even worse performance that my answer before assumed possible). This means a lot of scanning and buffering in-memory before we output stream to the client (which happens pretty fast today and will be far faster in ASP.NET Core).
What about all the other question lists that are a link away? Now we need to track a "HasMathJAX" boolean on all questions. This must be analyzed/reanalyzed on render or proactively stored and updated in the database. Now we're talking schema changes for efficiency, but still behind the analysis cost to determine the bit. Note: this won't help users of our API, those users just have to assume anything may have MathJAX.
The actual impact isn't actually "just the questions that use it". In a list, linked list, related list, search results, etc. if 1 of 50 questions use it, that's enough to have to load it. But we have to analyze it server-side to even get it that low.
In any of the above situations, users are loading a lot more JavaScript, have more pages with loading flashes, and have lower performance. The only way for us to counter some of this (getting the initial <script>
to load async
up top) is to do a lot more work on the server. And I have to stress the "some", because even that does little to counter the user impact.
So the question with any feature/change request remains: is it worth it? I still firmly believe that's a no. It's not worth the performance, perceived performance, or server efficiency tradeoffs involved.
<!-- awesome latex here -->
I think? – rene Sep 6 '17 at 5:27