Lately I have been playing with a few different javascript syntax highlighting
libraries. One which I think shows some promise is google-code-prettify, used
for highlighting on google code (Apache license.)

Advantages of javascript highlighting:
+ We could remove Pygments and Jython, Jython weighs in at 8.3MB making it the
largest jar in the lib folder, Pygments adds another 364K.

+ I understand Jython/Pygments has been responsible for recent out of permgen
memory errors.

+ Shifts work from server to client.

+ Adding a js syntax highlighting library to the svn repository allows us to 
patch
it to support xwiki syntax (switch lexers when macros are detected.)

+ Relatively easy compared to other performance boosters.


Disadvantages:
- Some users do not use Javascript.

- Highlighting may be slow on old computers when lots of code is displayed.

- Removing Jythion from the default build will add a step to upgrading for wiki
operators who are using the {{python}} macro.

- Adds another js file to download which hurts page load speed until a js
bundling plan is in place.


If there is significant interest, I could put up a comparison page on the
incubator.


Caleb

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to