Log in or register to post comments
Last post
ckeditor 4 hope
i'm ckeditor faithful fans,I sincerely hope ckeditor.js core file can be smaller,not every web server can be open compress file status. not every internet speed is good, 430K,too big,plase!!!!
Re: ckeditor 4 hope
The code size is one of our biggest challenges. We were facing it many times during works on CKEditor 4 and it was always important aspect of proposed feature or change. So I can honestly say now, that what we achieved is as smallest code size as possible in this time.

Of course, I don't claim that CKEditor's core can't be smaller :). It's possible to refactor the code in the way that it will compress even better - e.g. by avoiding object oriented programming (because methods' and properties' names can't be compressed) what should significantly (20-40%..., but only for ungzipped code - what happens when gzipping can be surprising and sometimes may have opposite effect) reduce the code size. But these kinds of compressions aren't safe for code quality, which is our priority too.

Other ways of reducing code size won't bring so significant change. There are not much we can move from the core to the plugins. Building so advanced editor for so many (old) browsers is hard and code is complex as hell. To reduce this complexity we dropped support for IE6 and removed some code written specifically for it, but that's only tip of an iceberg - IE7,8,9,Quirks:(( + FF3,latest + Chrome + Safari + Opera + Mobiles - all these browsers have their own issues which we've got to fix. And those fixes are distributed over entire editor, so gathering them together and separating to "support packages" doesn't seem to be possible.

Finally - The most important move towards reducing code size is the built-in builder. You can personalize your own CKEditor's build, by stripping plugins concatenated to the core "ckeditor.js" file. This way I've just created decent ckeditor.js file which has 372KB (110KB compressed) instead of 430KB for default settings (and around 500KB for full build). Of course that's not the only one file which CKEditor needs, but definitely biggest.

PS. As you can see stripping functionalities isn't the best way to reduce size. Gzipping is. Server without it shouldn't be used. Especially that nowadays 400KB isn't really so much comparing to typical pages and because after gzipping it's 120KB, which usually is cached well and that's less than typical image. BTW. GMail loads 1.6MB for me (dunno if that's gzipped size or original, but still a lot more).

Piotrek Koszuliński (aka Reinmar)
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+