Gday all,
I have some ideas/thoughts on fck loading speed that I thought I might share.
I noticed that when you load a blank page in a web browser, loading speed is real quick, add some html, still relativley quick, add some javascript.......get slow. When ever I write an application, speed and responsiveness plays a vital in my final product, so I came up with an idea that would theoretically increase the loading speed of the fck editor. The concept may not suit the project, but its something to consider. What if all the plugins, editor definitions, etc, were compiled, and not run during runtime on the client. I think its a waste of resources when everytime the page loads, the user has to reload and parse all the fck editor code. The core fck code could live on the client, but plugins and configs live on the server, for example:
User defines a plugin using javascript, that is parsed by a compiler.
User defines a config file that is parsed by the compiler.
Compiler creates a html blob, that contains the editor as the user sees fit.
Compiler creates a js file with id's and such, so no dom traversal is neccessary.
Server side connector grabs the html and chucks it out to the server, with the custom js file, and the core fck code.
Then wha'la, the editor should just come to live.
No need to dyanmically create dom objects on the client (which I hate, but do )
Obviously the code would allow it to be compiled at runtime, in the case that a server compile isnt avaliable. I never got around to implementing it, but it sounds good in theory. For the techies, it could be implemted using ruby and the ruby-spidermonkey library. I've done some experimenting with it in the past and it worked rather well.
Thoughts, ideas?
Keith
Tue, 02/12/2008 - 12:43
#1
Re: Some speed ideas.
I also had another idea, fck could piggy back on other frameworks the user is loading. Very much like what Ext http://www.extjs.com does. If the user has prototype on the client, fck could call utility functions from prototype, as apposed to internal functions. There obviously could be a fck version of the functions, so fck can run by itself.
Re: Some speed ideas.
Re: Some speed ideas.
Re: Some speed ideas.
True, but I would say most developers know about ruby, and are able to install it quite happily. I also believe a ruby script can be compiled into a standalone .exe, which should work on all machines. You could also provide an online solution for those who do not have access to ruby. The idea was to render the html on the server, save it as a blob of html in a file, and have the server script open the file, and throw that html at the client. The rendering of the html would only be done in ruby. I know prototype and script.aculo.us were able to deploy there projects with ruby rakefiles and test suites. But yeah, anyway its a idea.
Keith
Re: Some speed ideas.
I'm not sure that having the static HTML for the editor interface would speed up that much the editor loading. Not in such noticeable way. For instance, the HTML for the toolbar of FCKeditor 2 is about 20KB, so it would impact also in the download time.
Anyway, at the right moment, let's try to measure the time to build the editor interface, then we could consider this based on numbers.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Some speed ideas.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Some speed ideas.
Re: Some speed ideas.