Nice wiki speed up for syntax highlighting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As I was experimenting with the Developer Guide, we noticed unusually slow load times with its merged First Steps chapter. Guilhem looked into it and discovered the Python based syntax highlighting utility was spawning new shells for each code block like some kind of lunatic! Guilhem tested another MediaWiki extension based on highlight.js, but it had issues and is not actively maintained.

Luckily, I found a nice extension written by Scratch contributor apple502j: https://github.com/InternationalScratchWiki/SyntaxHighlight_PrismJS

It uses prism.js: https://prismjs.com/

It was tested in our testwiki and is now deployed in production. The load time of the dev guide First Steps chapter is like 50x faster now.

The chapter in question: https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps

Ilmari



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux