On Jan 31, 2010, at 5:00 AM, Caleb James DeLisle wrote:
> 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.
- PDF/RTF exports don't have code highlighted
Note that we've already talked several times about this (we've evaluated this
option before we started work on integrating pygments) and we considered there
were too many cons. That said we could have 2 macros (one server side and one
client side).
Thanks
-Vincent
> 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