Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345483 - [client] Allow for better page optimization
Summary: [client] Allow for better page optimization
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 14:16 EDT by Simon Kaegi CLA
Modified: 2011-09-01 11:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2011-05-11 14:16:57 EDT
At the moment our pages are directly including a number of individual css and javascript files and in some cases we're even inlineing code and styles. Both make it difficult to really optimize how a page loads because we end up with on the order of 25 loads or cache checks per page.

To better support optimization we should instead have just one .css file and one .js file per page. So, for example "coding.html" should just include a "coding.js" and a "coding.css". This will allow us to hide the work being done to provide code and styling information. 

An optimized build could put all the contents in those one files or perhaps some clever layering if we find that makes sense. A development build could use @import statements and dynamic loading via requirejs to ease debugging and editing and give us some flexibility to try things out.
Comment 1 Simon Kaegi CLA 2011-05-11 14:18:23 EDT
I'm going to start just with CSS as we have more work before we can start doing JavaScript with requireJS. Expect a small modification to essentially all the HTML files.
Comment 2 Susan McCourt CLA 2011-05-11 21:48:41 EDT
(In reply to comment #1)
> I'm going to start just with CSS as we have more work before we can start doing
> JavaScript with requireJS. Expect a small modification to essentially all the
> HTML files.

We need to delete the old copies of the CSS files that got moved from static to static/css.  I just merged and could not for the life of me figure out why my landing page styling looked wrong.  The problem was that git merged the html nicely so that I was pointing at the copy of the stylesheet, but all my changes had been made in the original one.

I didn't do this myself because I wasn't sure if you were done here, but it would help reduce confusion to delete the old copies as soon as it is safe.
Comment 3 Simon Kaegi CLA 2011-05-13 10:00:40 EDT
Forgot to add a comment here.
When I committed my change I forgot to also do the git rm for the files I renamed. Fixed now -- sorry for the confusion
Comment 4 Simon Kaegi CLA 2011-05-13 10:04:56 EDT
To allow CSS ptimization we need to use relative urls when we do our @imports. I've checked that in now.
Comment 5 Andrew Niefer CLA 2011-05-13 15:08:36 EDT
Test build is available here: 
http://build.eclipse.org/eclipse/e4/orion/N201105131436/N20110513-1436/

All css files under org.eclipse.orion.client.core/static have been inlined and comments removed.  This is the requirejs "standard.keeplines" css optimization.

Nothing special must be done for maintenance going forward, except if we begin importing css file from somewhere other than org.dojotoolkit or the orion.client.core/static
Comment 6 John Arthorne CLA 2011-06-06 08:50:37 EDT
This was done for M8.