Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327542 - Reduce size of client Javascript code
Summary: Reduce size of client Javascript code
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 328107 330225 332524 342047 384157 384163
Blocks:
  Show dependency tree
 
Reported: 2010-10-12 07:32 EDT by Ralf Sternberg CLA
Modified: 2013-07-01 05:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2010-10-12 07:32:28 EDT
The compressed size of our Javascript library (client.js) that is pushed to the client is currently about ~ 980kB. We should try to reduce it by cleaning up unused code from the qooxdoo library.

An example is conditional code where the conditions will always yield false. This can be due to settings (qx.core.Setting) that are never set in RAP.
Comment 1 Tim Buschtoens CLA 2010-10-18 11:25:32 EDT
I removed the following unused classes in CVS HEAD:
- qx.io.remote.IframeTransport
- qx.ui.form.InputCheckSymbol 
- qx.ui.form.CheckBox 
- qx.ui.form.RadioButton 
- qx.log.appender.HtmlElement 
- qx.application.Basic
Comment 2 Tim Buschtoens CLA 2010-10-18 11:48:03 EDT
I manually searched for static qooxdoo classes that could be removed, but found nothing that could be safely be removed without major refactoring.
Comment 3 Tim Buschtoens CLA 2010-10-26 08:17:46 EDT
I removed some dead code from the qx.bom.Element.* classes.
Comment 4 Tim Buschtoens CLA 2010-10-27 06:30:06 EDT
I removed unused classes qx.constant.Core, qx.core.Package and qx.lang.Generics in CVS HEAD.

I found a couple more classes that can be removed with a reasonable amount of refactoring. Also, some more classes can be reduced in size by removing dead code.
Comment 5 Tim Buschtoens CLA 2010-10-27 09:33:12 EDT
Removed more dead code in CVS HEAD from these static classes:
- qx.dom.Node 
- qx.util.Validation
- qx.util.ColorUtil
- qx.html.Dimension
- qx.html.Scroll 
- qx.html.StyleSheet
- qx.lang.Array
- qx.lang.Function 
- qx.lang.String
Comment 6 Tim Buschtoens CLA 2010-10-27 11:23:29 EDT
Removed everyhting qx.locale.* (5 classes) with some refactoring in Calendar.js, Property.js, and Spinner.js.
Comment 7 Tim Buschtoens CLA 2010-10-27 12:06:09 EDT
removed qx.core.Log and the dead code in Object.js that used it.
Comment 8 Tim Buschtoens CLA 2010-10-27 13:06:46 EDT
Removed all remaining Interfaces (IApplication, IResizeable, IRange) with some minor refactoring, and qx.Interace. Interfaces are now no longer supported.
Comment 9 Tim Buschtoens CLA 2010-10-27 14:20:14 EDT
Removed the following classes with some minor refactoring in related classes:
- qx.core.Aspect
- qx.core.Version
- qx.util.Compare
- qx.bom.client.Engine
- qx.util.Normalization

Client.js in now 942KB, thats almost 40K less since this bug was opened.

I could do this forever, but i think that i now have picked all the low-to-mid-hanging fruits. To remove any more code would mean considerable refactoring. The most tempting remaining target is probably LegacyProperty.js...
Comment 10 Tim Buschtoens CLA 2011-04-07 05:42:24 EDT
By removing client-logging and some other stuff we are currently at 880KB.
 
LegacyProperty is used for 3 kinds of properties:
- _legacy properties, which are not used, therefore that code can go
- _fast properties, which are simple and rarely used, so that can go after some refactoring
- _cached proprties, which are heavily used and can not be removed at this time

As soon as Bug 342047 is fixed, it might be feasible to remove Alias.js.

As soon as Atom has been removed or replaced with MultiCellWidget, the entire Preloading system could go.
Comment 11 Tim Buschtoens CLA 2011-06-09 10:50:22 EDT
After the Tree-Table merge, we are now at 863 kB.
Comment 12 vineel Mising name CLA 2012-05-30 08:35:05 EDT
Can some one explain me , how messages are exchanged between Java code on the server and Java script client code .. in case of Eclipse RAP applications
Comment 13 Tim Buschtoens CLA 2012-05-30 10:20:20 EDT
Hi. This is really off-topic, a better place for such questions is the forum (http://www.eclipse.org/forums/index.php?t=thread&frm_id=34).

To answer your question, look here: http://wiki.eclipse.org/RAP/RWT
Comment 14 Tim Buschtoens CLA 2013-07-01 05:26:38 EDT
I think by 2.0 we trimmed the current client as much as can be done without re-implementing *a lot* of older code, which is hard to justify. Also, the new RAP protocol could provide an opportunity to create a real slim client with a completely new widget set.