LeaVerou/dabblet — Issue #132: Split the code for the editor and everything else
Author: kizu
Created: 2012-01-23 15:11:03+00:00
State: open

I have an idea how to split the code to make the dabblet's loading time faster.

While this is an issue to research, I suppose that a lot of people land on dabblets without an urge to edit some code there. They could go from a twitter link, from the stackoverflow or any other place, so in majority they won't need the code for an editor at all.

So, it would be logical to split the code into two parts: the one that is now minus the code for an editor, and the editor itself (with all of the previewers and other stuff), and then lazyload the editor afterwards, or by request (clicking on the editor area if user don't have an editor in cache would cause the preloader to appear with the message like “code editor loading” or just a spinner.

I think, that it can reduce a lot of code that the usual user would get, also you could load the full code when user opens the new dabblet like http://dabblet.com/, 'cause in that case the possibility that user would actually edit some code would be higher.

There could be other downsides or things to think about, but I think that such split would be helpful (and doing so can ease the adding of new features to the editor — you won't need to fear that those features would slow down the regular user).