Community
Participate
Working Groups
We are currently copying the entire Dojo library into the target Web project during deployment. I would estimate, based on the set of Dojo widgets shipped in EDT 0.7, that 75% of the files are unnecessary. We need to investigate how we can reduce the number of files we deploy and also minify/compress as well. For reference: http://dojotoolkit.org/reference-guide/build/
Dojo 1.7 has major changes in kernel, there might be good stuff we can leverage. ====== New in 1.7 New lightweight kernel Dojo 1.7 is the largest update to the Dojo toolkit since Dojo 1.0. We’ve completely refactored Dojo around a lightweight modular kernel with minimal base dependencies, while retaining compatibility with older Dojo versions.
This item is part of the Dojo 1.7 update. Reassign to lulu.
This is not a deployment issue, change it to proper component. thanks.
Created attachment 211564 [details] New Dojo widget folder structure What I have done: 1. Summarize the required dojo widgets in EDT, and release a new Dojo build for 1.6.1 2. dijit/dojo/dojox only contain required CSS/nls/icons/EGLDojoWidgets(widgets folder) 3. Has been verified using 'org.eclipse.edt.rui.dojo.samples_0.7.0' project.(Looks all widgets work well) ps. Same structure can be used in Dojo 1.7.1. Hi Brian and JiYong, I am not very sure if I have lost anything, please help to review. Any comment is welcome. Thanks. :-)
Can you provide a screen capture of the differences between the .8 M2 version of the Dojo Remote project and the .8 M3 version you are creating? Also, how big is the M2 version of the project (in KB), and how big is the M3 version of the project? Are we running the new version of the project through ShrinkSafe to minify and compress the content, and if not, why?
Hi Brian, Please ignore my comment #4. According to 'Bug 368555 - Investigate modular loading in HTML generator', new implementation has been done. The modular loading mechanism follow AMD now, required js files will be loaded individually when required, not need to load dojo.js(compile required js files together), so we don't need to compile a new dojo build for EDT. I simplify the dojo 1.7.1 standard build(not src build) for EDT usage. Compare (dijit, dojo, dojox) size between M2 & M3: M3 version: 3.85 MB (4,039,362 bytes), contains 1,272 Files, 223 Folders; M2 version: 11.1 MB (11,706,455 bytes), contains 5,183 Files, 1,156 Folders btw. This simplified version will be fully tested. :) (In reply to comment #5) > Can you provide a screen capture of the differences between the .8 M2 version > of the Dojo Remote project and the .8 M3 version you are creating? Also, how > big is the M2 version of the project (in KB), and how big is the M3 version of > the project? > > Are we running the new version of the project through ShrinkSafe to minify and > compress the content, and if not, why?
Created attachment 211705 [details] Simplified Dojo1.7.1 build for EDT usage Simplified Dojo1.7.1 build for EDT usage. Will be verified using samples.
Created attachment 211709 [details] Simplified Dojo1.7.1 for EDT usage Verify this simplified Dojo build using sample project. ps. use nightly build (0.8.0.v201202272101)
In our discussion on AMD loading today, Ji Yong mentioned that it was better for the Dojo Local runtime project to build dojo.js so that it includes all of the AMD modules that can be used by our widgets, since it reduces the load times by 2 seconds and eliminates 200+ requests to the VE server. Ji Yong also mentioned that this is how the project is currently being built. In comment 6 it states that the local runtime project will use AMD, which I believe means that the dojo.js file will be very small and all of the required modules will be loaded at runtime. Can you clarify which version we are going to be using in .8? If the projects mentioned in comment 6 are using the small dojo.js implementation, please discuss this with Ji Yong and determine if we should make a change to build a large dojo.js file. In comment 6, it indicates that we will have a very large reduction in the size of our Dojo Local runtime project, which is great. Assuming these numbers are based on a small dojo.js file and the use of AMD, how do these numbers change if we go with a large dojo.js file? I assume the size remains the same, or similar, but does the overall number of files go down, and if so, by how much?
Hi Brian, yes, we will choose the large dojo.js which compiled with all required .js files. Currently, the compiled dojo build is 5.25MB, 975 Files, 196 Folders. File number is less than the one which was created in comment 7, but it size a bit larger than that one, that because size of the compiled dojo.js(1,060KB) and dojo.js.uncompressed.js(2,613KB) is almost 3.58MB...(If we don't need to see the uncompressed js code, then we can also delete it, but it's should be better to keep it in build), and the other files are CSS/NLS/Template. I will attach the compiled dojo build, please take a look. Thanks. (In reply to comment #9) > In comment 6, it indicates that we will have a very large reduction in the size > of our Dojo Local runtime project, which is great. Assuming these numbers are > based on a small dojo.js file and the use of AMD, how do these numbers change > if we go with a large dojo.js file? I assume the size remains the same, or > similar, but does the overall number of files go down, and if so, by how much?
Created attachment 211940 [details] Compiled dojo build Attached the compiled dojo build, which has been verified by sample project.
Created attachment 211942 [details] Changes of version in local & remote runtime and resource ant file This patch contains changes in following files: - org.eclipse.edt.ide.ui.resources/customBuildCallbacks.xml - local runtime: - includeDojo.html - version.txt - remote runtime: - README_GOOGLE_RUNTIME.html - includeDojo.html - version.txt
Committed.
Lu Lu, it looks like we need to update the about.html file in org.eclipse.edt.rui.dojo.widgets\WebContent\about.html
Hi Brian, yes, I patched the about.html with AMD changes... add a new patch in this bug, which has been updated with Dojo 1.7.1 license and version, please help to submit it. Thanks. (In reply to comment #14) > Lu Lu, it looks like we need to update the about.html file in > org.eclipse.edt.rui.dojo.widgets\WebContent\about.html
Created attachment 212012 [details] patch of about.html's version and license changes
Committed the updates for about.html. I have updated our build scripts to remove dojo.js.uncompressed.js from the built version of the 1.7.1 local runtime. This file is still in CVS if you checkout the dojo.local runtime project. For the record, our runtime projects are now: org.eclipse.edt.rui.dojo.runtime.local org.eclipse.edt.rui.dojo.runtime.remote The version number is added as part of the nightly build. Each time we move to a new version of Dojo, we will tag the current version and change the files. If an older version of the runtime is needed, we can check it out using the tag.
Thanks, Brian. Resolve this bug.
close