#1622: CSS cache in JS
----------------------------+-----------------------------------------------
  Reporter:  designfu       |       Owner:  alfonsoml
      Type:  New Feature    |      Status:  assigned 
  Priority:  Normal         |   Milestone:           
 Component:  Core : Styles  |     Version:  SVN      
Resolution:                 |    Keywords:  Review?  
----------------------------+-----------------------------------------------
Changes (by alfonsoml):

  * keywords:  HasPatch => Review?

Comment:

 This new patch shows the current status.
 If you want to test how it behaves when the code is packaged then
 uncomment the four FCKCSSManager.AddCachedCSS lines at the end of the
 FCKCSSManager.js file.

 The new patch does support a CSSDom parser, so it automatically can cache
 any file that will be later used again. This can be seen easily with the
 dialogs, before each time a dialog was opened there was 2 request for the
 same css file sent to the server, now it only does it once, just the first
 time that it loads the dialog frame. This is done without any requirement
 to package the css file.

 In the body of the editor the benefits are visible if you switch to source
 mode and back to design, the css files aren't requested again.

 Currently some files are still requested twice because they are used in
 two different frames and they are loaded before the main window does
 finish. Maybe another idea to improve loading time would be to delay the
 creation of the panels until the moment that they are really needed. I
 thought that it was already that way, as it could save some little time
 initializing those panels if they aren't gonna be used.

 If the css files are packaged then the requests for them can be 0 if I
 have not forgotten anything.

 The css parser does have the benefit from my point of view that it doesn't
 interfere with the browser with the loading order of elements, if we use a
 XmlHttpRequest it must be a blocking request, but the browser might choose
 to load the css in parallel, so we would be forcing a delay in the loading
 time. Maybe there's some file that we can choose to load by a
 XmlHttpRequest, but the benefit of the current patch is that it doesn't
 should have no drawback in any browser (only just a little processing time
 for the stylesheet, but that should be almost 0). We can study later the
 best approach for the files that are loaded twice.

 Marking for review just to get comments, not really to check it in.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/1622#comment:6>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to