I really like codemirror.net
And I am now using it just to render some large snippets of code in my web site.
My question is: Should I really opt for a lighter library since I don't use any of the online-live-editing-features that code mirror gives me ?
This is a real issue for me because I am displaying snippets of 10000 lines of code and a fast renderer matters.
Can somebody technically defend or accuse my usage of code mirror ?
p.s. Please guys don't suggest to do the parsing/rendering on the serverside. It needs to be done on the browser for many reasons I need not to explain.
preguntado el 01 de febrero de 12 a las 14:02
Your question is subjective, but I'll try and answer.
All else being equal, the library with the least number of features you don't need will be the best for you. If you nunca plan on allowing editing, you probably are paying some overhead cost in rendering for it that isn't being utilized. For that reason I'd say CodeMirror probably isn't the best choice.
That said, use whatever works for you. Does CodeMirror work for you? Do you understand it and is it comfortable? Is it fast enough for your intended purpose, or do you feel it is bogging down with your file sizes? Is editing ever on the roadmap for your application? These are the questions you need to be asking and only you can answer.
People have written plenty of things they knew weren't the most efficient and sometimes were downright slow, but it was easier and they knew it was fast suficiente. Not every program has to be sleek and super optimized if it requires too much effort to get there for what you'll get out of it.