-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-process Build #1296
Pre-process Build #1296
Conversation
@@ -46,6 +50,31 @@ | |||
<antcall target="generateDocumentation" /> | |||
<antcall target="buildApps" /> | |||
</target> | |||
|
|||
<target name="combineRelease" depends="build" description="Combines all source files into a single stand-alone script with debugging code removed."> | |||
<antcall target="combineJavaScript"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a tab in here. Sorry. The Eclipse formatter should be safe to run on the whole file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this file uses tabs exclusively, I forgot. In any case, the formatter should be fine.
You should add the |
@shunter I wasn't sure what else should have it. Everything that uses r.js? |
Well, the places where we use r.js to minify CSS doesn't need it. Otherwise, yeah. I think for buildCesiumViewer we can always do debug=false. |
Add the new build targets to the Contributor's Guide. |
We need links in index.html to be able to run with these? Also are we required to use the combined version? I thought we were going to setup an AMD version just like code coverage? |
I thought we had to make changes to the tests so they still pass in release? |
I stepped through |
I don't know what this means. We microbenchmarked individual functions? We care about performance in practice for scenes with lots of draw commands. Compare both FPS and the profiles for:
|
@shunter can do the merge once this is ready. |
* Cesium.js now exports modules using the actual module name instead of rewriting the names to be identifiers. * Stubs/map (misnamed) now provides path mappings. * Cesium.js includes createTaskProcessorWorker because Specs need it. * Use the require.js shim feature to require in the combined Cesium.
Conflicts: Source/Renderer/Context.js
…mbined Cesium.js.
@shunter This is ready for another review. |
This also addresses #1294. |
Any update here? |
Also correct some specs that were marked toThrowDeveloperError but the code didn't actually throw DeveloperErrors.
…false for CesiumViewer.
As discussed offline, I fixed a few problems and added info to CHANGES. Merging. |
Adds RequireJS pragmas to conditionally include code that throws
DeveloperErrors
like:tag
can be any string describing the block, but the tags in each includeStart/includeEnd must be the same.condition
can be any javascript that is evaluated at build time.pragmas.debug
will betrue
for debug builds orfalse
for release builds.Adds two new build targets,
combineRelease
andminifyRelease
, which are the same ascombine
andminify
except they definedpragmas.debug
to be false.Adds pragma statements like above to every function in
Context
,Cartesian*
,Matrix*
andQuaternion
that will be removed whenpragmas.debug
isfalse
.The performance was improved by ~2-4% for the most frequently called functions. The minified size decreased by ~0.02 MB.