Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Issue 22488002: Tightening up dart2js load timing. (Closed)

Created:
7 years, 4 months ago by blois
Modified:
7 years, 4 months ago
Reviewers:
vsm, ricow1, ahe, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Tightening up dart2js load timing. The timing of main() execution in dart2js currently occurs after 'loaded' which is quite late in the page load phase (after all images) and is inconsistent with Dartium. In order to get the timing more consistent with Dartium and more consistent in general this CL makes a couple of changes: - dart2js generated code is now executed synchronously- this gives end developers more control over timing of main(). - A warning is generated if main() is executed during document parse time- this is primarily to ease the transition and let users know what needs to be done to more closely match Dartium behavior. - dart.js bootstrapper no longer waits for DOMContentLoaded- the modified script tags will be executed after parse phase, the additional delay should not be necessary. Breaking changes: - dart2js main() execution in standard project templates now occurs after document parse but before all assets have been loaded - Script tags directly referencing dart.js files will now execute synchronously. It's recommended that defer tags be added to these, or that they be moved to the end of the body tag. - dart.js bootstrapper will now only auto-load script tags which occur before it on the page. BUG=4718 R=sra@google.com, vsm@google.com Committed: https://code.google.com/p/dart/source/detail?r=26149

Patch Set 1 : #

Total comments: 4

Patch Set 2 : #

Total comments: 9

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -41 lines) Patch
M pkg/browser/lib/dart.js View 1 chunk +21 lines, -22 lines 0 comments Download
M samples/third_party/dromaeo/generate_dart2js_tests.py View 1 chunk +1 line, -1 line 2 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 3 2 chunks +35 lines, -16 lines 0 comments Download
M tools/testing/dart/browser_test.dart View 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
blois
7 years, 4 months ago (2013-08-06 23:29:42 UTC) #1
vsm
lgtm, but do we need to change the editor templates as well? E.g., to add ...
7 years, 4 months ago (2013-08-07 16:10:12 UTC) #2
ahe
I don't think you can submit it as is. It looks pretty good, but there ...
7 years, 4 months ago (2013-08-07 16:24:47 UTC) #3
blois
Thanks for the feedback Peter, I realize you're in the middle of a bunch of ...
7 years, 4 months ago (2013-08-07 17:39:50 UTC) #4
ahe
https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2984 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2984: Isolate.\$isolateProperties.\$currentScript = currentScript; Did you test this in minified ...
7 years, 4 months ago (2013-08-12 15:58:39 UTC) #5
ahe
Hi Pete, If you can get Stephen to accept this, don't wait for my approval ...
7 years, 4 months ago (2013-08-12 15:59:27 UTC) #6
blois
https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2984 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2984: Isolate.\$isolateProperties.\$currentScript = currentScript; On 2013/08/12 15:58:39, ahe wrote: > ...
7 years, 4 months ago (2013-08-12 17:00:07 UTC) #7
ahe
https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2988 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2988: // Bug dartbug.com/12281 this warning is to let users ...
7 years, 4 months ago (2013-08-12 17:08:01 UTC) #8
blois
https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/22488002/diff/34001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2988 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2988: // Bug dartbug.com/12281 this warning is to let users ...
7 years, 4 months ago (2013-08-12 17:43:45 UTC) #9
sra1
lgtm https://chromiumcodereview.appspot.com/22488002/diff/49001/samples/third_party/dromaeo/generate_dart2js_tests.py File samples/third_party/dromaeo/generate_dart2js_tests.py (right): https://chromiumcodereview.appspot.com/22488002/diff/49001/samples/third_party/dromaeo/generate_dart2js_tests.py#newcode65 samples/third_party/dromaeo/generate_dart2js_tests.py:65: script = '<script type="text/javascript" src="%s">' % jsname Does ...
7 years, 4 months ago (2013-08-12 21:22:26 UTC) #10
blois
https://codereview.chromium.org/22488002/diff/49001/samples/third_party/dromaeo/generate_dart2js_tests.py File samples/third_party/dromaeo/generate_dart2js_tests.py (right): https://codereview.chromium.org/22488002/diff/49001/samples/third_party/dromaeo/generate_dart2js_tests.py#newcode65 samples/third_party/dromaeo/generate_dart2js_tests.py:65: script = '<script type="text/javascript" src="%s">' % jsname On 2013/08/12 ...
7 years, 4 months ago (2013-08-14 20:44:39 UTC) #11
blois
Committed patchset #4 manually as r26149 (presubmit successful).
7 years, 4 months ago (2013-08-14 20:51:50 UTC) #12
ricow1
This broke IE bots, which had been moved to FYI
7 years, 4 months ago (2013-08-15 08:21:30 UTC) #13
ahe
7 years, 4 months ago (2013-08-15 08:37:34 UTC) #14
Message was sent while issue was closed.
On 2013/08/15 08:21:30, ricow1 wrote:
> This broke IE bots, which had been moved to FYI

I think we have to revert this and investigate. 

Very frustrating, this CL was going to solve a lot of problems :-(

Cheers,
Peter

Powered by Google App Engine
This is Rietveld 408576698