Dear GWT team (and John in particular),
In other words, with the new incremental compiler, the biggest slowdown during recompilation seems to be the linker now, right?If the linking time can go down to, say, a couple of seconds, then SDM is there (IMO).
For example, I noticed that a huge amount of time (> 50% of the whole linking time) is spend in "Saving source with extras", i.e. SourceSaver. Given that these sources are only needed by the browser during a sourcemap-based debugging session, can't they be served on the fly by the code server rather than being pregenerated on disk during the recompilation? There are debugging scenarios (in-IDE debugging with SDBG), where these source files are not even needed and never requested from the codeserver.
Finally one side question:Does the incremental compiler preserve the names of the generated JavaScript types/functions across recompiles? Including the names of the types/functions which ARE recompiled (as long as the programmer did not change the name of the corresponding Java method/class, that is)?
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/5a2a4436-5c2d-4e60-9d5d-314db0045b7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For example, I noticed that a huge amount of time (> 50% of the whole linking time) is spend in "Saving source with extras", i.e. SourceSaver. Given that these sources are only needed by the browser during a sourcemap-based debugging session, can't they be served on the fly by the code server rather than being pregenerated on disk during the recompilation? There are debugging scenarios (in-IDE debugging with SDBG), where these source files are not even needed and never requested from the codeserver.Actually, saving sources isn't strictly needed to make source maps work, especially for non-Googlers, so we can probably default this to false.
Finally one side question:Does the incremental compiler preserve the names of the generated JavaScript types/functions across recompiles? Including the names of the types/functions which ARE recompiled (as long as the programmer did not change the name of the corresponding Java method/class, that is)?Yes, within a session. If you restart SDM, then no. Hot-patching and expression evaluation are definitely things we've discussed (I want to build an Apple XCode/Swift Playground-like REPL for fun myself), but first we've got to make the normal SDM experience out of the box great, including IDE integration and super-fast recompile. Once we get there, hopefully we can do the other things and reach a state that was better than DevMode was.
So out of pure curiosity - are there obvious optimizations in the linker which are still pending?
For example, I noticed that a huge amount of time (> 50% of the whole linking time) is spend in "Saving source with extras", i.e. SourceSaver. Given that these sources are only needed by the browser during a sourcemap-based debugging session, can't they be served on the fly by the code server rather than being pregenerated on disk during the recompilation? There are debugging scenarios (in-IDE debugging with SDBG), where these source files are not even needed and never requested from the codeserver.
Dear GWT team (and John in particular),Lately I was checking from time to time the progress of the SDM incremental compiler in GWT 2.7.0.Let me first say - great work so far!This morning our project was - for the first time - compilable with the new incremental SDM code-path, without internal compiler errors or visible malfunctioning.
And this with NO changes to the codebase. Also the fact that I don't have to split our codebase into very many small acyclic modules (not that it is not a good practice anyway) is obviously a HUGE PLUS.What I am observing in terms of recompilation times is encouraging (25 seconds with 2.7 vs. 47 with 2.6.1) but what is even more interesting is that the compilation itself (up until where it says "Compile of permutations succeeded") seems to take only 7 seconds, which is less than 30% of the recompilation time.In other words, with the new incremental compiler, the biggest slowdown during recompilation seems to be the linker now, right?
If the linking time can go down to, say, a couple of seconds, then SDM is there (IMO).So out of pure curiosity - are there obvious optimizations in the linker which are still pending?For example, I noticed that a huge amount of time (> 50% of the whole linking time) is spend in "Saving source with extras", i.e. SourceSaver. Given that these sources are only needed by the browser during a sourcemap-based debugging session, can't they be served on the fly by the code server rather than being pregenerated on disk during the recompilation? There are debugging scenarios (in-IDE debugging with SDBG), where these source files are not even needed and never requested from the codeserver.Also, is there any way to accelerate the linker which is in the control of the developer?For example, can I turn off the above source files pregeneration to see how much time is saved during recompilation?=================Finally one side question:Does the incremental compiler preserve the names of the generated JavaScript types/functions across recompiles? Including the names of the types/functions which ARE recompiled (as long as the programmer did not change the name of the corresponding Java method/class, that is)?
Because if it does, this opens interesting possibilities:(a) Javascript hot-swappingOne disadvantage of the current SDM recompilation is that it triggers page reload in the browser.If the application being debugged is a stateful, single-paged one, this means that even for a very small change, the developer essentially starts-over the debugging, as the application state is lost.Now, the debugging protocol of Blink allows the debugger to hot-swap a piece of JavaScript with a newer version, right?If the incremental compiler preserves the names of the generated Javascript types/functions, then a debugger like SDBG can detect the SDM recompilation and can pro-actively push the newly generated JavaScript into the browser. Imagine how cool is this: you stay on the page, spot a bug (say, in an onclick event handler), fix the bug in the Java code, hit the Recompile button (or Eclipse/SDBG does it for you behind the scenes when you save your Java file!) and there you have it - you can click again and now the correct, recompiled event handler will be triggered. All of this without leaving the application page and starting over.Of course, for the above to work, additional changes may be necessary. For example, contrary to production, the generated javascript file should probably always be named the same way. Perhaps, it should also not contain one big "eval" statement. Finally, for big changes, the above hot-swapping will likely not work, but the idea is not to make it work in all cases, but for the majority of the small, incremental changes.
So out of pure curiosity - are there obvious optimizations in the linker which are still pending?We have been thinking about strategies to incrementalize the work done by the linkers, one idea is to have a linker that outputs js for different Java classes to different resources and that could be incrementalized.
For example, I noticed that a huge amount of time (> 50% of the whole linking time) is spend in "Saving source with extras", i.e. SourceSaver. Given that these sources are only needed by the browser during a sourcemap-based debugging session, can't they be served on the fly by the code server rather than being pregenerated on disk during the recompilation? There are debugging scenarios (in-IDE debugging with SDBG), where these source files are not even needed and never requested from the codeserver.I am currently working on this one. There are two options here: 1) serving source code directly without copying and 2) copying only "changed" sources. Option 1) would be the optimal in terms of compile time but it might result of a worse debugging experience (if you modify a source while debugging the source mapping will be out of date).
(a) Javascript hot-swappingOne disadvantage of the current SDM recompilation is that it triggers page reload in the browser.If the application being debugged is a stateful, single-paged one, this means that even for a very small change, the developer essentially starts-over the debugging, as the application state is lost.Now, the debugging protocol of Blink allows the debugger to hot-swap a piece of JavaScript with a newer version, right?If the incremental compiler preserves the names of the generated Javascript types/functions, then a debugger like SDBG can detect the SDM recompilation and can pro-actively push the newly generated JavaScript into the browser. Imagine how cool is this: you stay on the page, spot a bug (say, in an onclick event handler), fix the bug in the Java code, hit the Recompile button (or Eclipse/SDBG does it for you behind the scenes when you save your Java file!) and there you have it - you can click again and now the correct, recompiled event handler will be triggered. All of this without leaving the application page and starting over.Of course, for the above to work, additional changes may be necessary. For example, contrary to production, the generated javascript file should probably always be named the same way. Perhaps, it should also not contain one big "eval" statement. Finally, for big changes, the above hot-swapping will likely not work, but the idea is not to make it work in all cases, but for the majority of the small, incremental changes.It does sound like an interesting idea. If at some point the browser reload time (as opposed to the compile time) is the longest part then we will start looking at ways to speed that up. One similarish idea we've discussed is to change the linkers so that the output JS exists as separates files. This would allow the browser to hold on to it's precompiled javascript cache for parts of the application that haven't changed (thus reload much faster). But as Ray mentions, we're pretty heads down on an earlier stage of development right now. So I probably won't be looking at something like this any time soon, but patches welcome.
What I am working on is trying to flesh out the "maturity" of this current approach. At the moment we do not notice when you change the content of resource files which were inputs to Generators and so as a result we fail to rerun those Generators when we should. Once this is corrected there will be a while spent on general bug finding.After that we will probably start looking at remaining performance bottlenecks. Roberto is already looking at Linkers and we think that the next big opportunity after that will be in improving the TypeOracle construction time (see https://gwt.googlesource.com/gwt/+/master/dev/core/src/com/google/gwt/dev/javac/CompilationUnitTypeOracleUpdater.java and related classes). But there will probably be other opportunities as well.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/1132c1d4-0ac7-4d1e-a1ad-7575e6dadab5%40googlegroups.com.
We just finished fixing a couple of issues in this compile mode (one around JSOs and a couple around rerunning Generators).Any more feedback you have would be appreciated. If you see any bugs please report them.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c646cebb-005a-42fd-9f9d-62334e1a3189%40googlegroups.com.
Great news!! Thanks a lot for the effort.
On 29 August 2014 13:02, Ivan Markov <ivan....@gmail.com> wrote:
BTW using a more recent laptop seems to make a difference and nearly doubles the performance:MacBook Pro model 2013 (I7 2.7 GHz):- 2 to 3 seconds for recompiling changes to a single file- 2 to 3 seconds for linking- Changes to more types of course again results in a growth of the recompilation time; this time it is 8 instead of 13 seconds for the same set of around 10 changed files. Linking still 3 seconds.I think you are getting there!
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/2e4c1342-cd60-48c8-b6c0-eb286350b36b%40googlegroups.com.
--To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CALLujipnmokiRVxtpE1g%2BF%2BccZbkt0nZYf3jKsDm3ogvmN52%3DA%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/1EYSq2QZ51s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CANjaDneM-U8n56Kjr36Ce5D7_HRvaCcCqExFM4QB%2B-TsQdKNTg%40mail.gmail.com.
Hi guys,I have just tried out the 2.7-SNAPSHOT. I have a fairly large multi-module maven project.For development, I am using STS 3.6, windows7, SSD, i7 3720qm 2.6Ghz,Starting SuperDevmode:Unification traversed 147422 fields and methods and 11825 types. 11773 are considered part of the current module and 11773 had all of their fields and methods traversed.Compilation succeeded -- 113.359sLinking succeeded -- 2.768s120.982s total -- Compile completed
Changing One File in one module project/jar:Unification traversed 5282 fields and methods and 2440 types. 238 are considered part of the current module and 238 had all of their fields and methods traversed.Compilation succeeded -- 9.081sLinking succeeded -- 1.566s13.436s total -- Compile completedSome other things to note:When using GWT 2.6.1, a recompile used to take about 45 secs or so.Sourcemap debugging in Chrome now works perfectly! I can now debug the javascript via java in chrome and all the line numbers match. (This was not the case with 2.6.1)On the third compile I tried changing 3 files, however it gave me errors about not finding some class files.
I will try to keep using this, and report any other findings.Keep up the great work guys, GWT development is going to get so much cooler. :)Looking forward to the official release
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/f300a560-19e8-44bd-ba39-b2e48abb8522%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/2e4c1342-cd60-48c8-b6c0-eb286350b36b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/ecad7963-656b-48f2-b85e-ce56060359c0%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
Any new bugs to report?
Any new bugs to report?Some things we have observed at work while using latest trunk SDM (compile per file):1.) If we don't use -noprecompile then SDM does not start because it says it has found more than one permutation. If we use -noprecompile then SDM starts and the first compile through the bookmarklet works as well. Our trunk build from 1st Sep still worked in both situations. With current trunk the precompile says that it can not set the locale property to "en" because only "de" was allowed, then tries a fallback value and finally the precompile fails.
2.) From time to time it happens that a recompile through the bookmarklet breaks the app because some JS isn't emitted correctly. For example we have a factory that creates a specific Ginjector and that factory has rebind rules that are triggered by a form factor property. Just today a colleague has recompiled the app and got "DesktopGinjectorProvider is undefined". Another example is that a custom composite stopped working with error "undefined is not a function". Taking a look at the JS code is seems like the problem happened in the constructor function that wanted to call the clinit function for that class. The machine that had the issue also had Chrome beta so I wasn't able to debug the pure JS because of 4.)
3.) On one machine the first compilation after starting SDM with -noprecompile never finishes. The CodeServer java process does some heavy work for the first minute or so and then goes to sleep and thats it. I call it "SDM progress dots of death". The CodeServer arguments are exactly the same as on other machines which work without issue. I have no idea why this is happening. Also this only happens with latest trunk, a build from 1st Sep works.
4.) Not directly GWT related but you might want to know it: The new Chrome beta contains the change that Brian asked for which marks lines without source maps in gray so you know that you can not put a breakpoint on these lines. However for some reasons Chrome now also forbids setting breakpoints in the pure JS file (e.g. app-0.js) if no source map entry was found for that JS line. That can be quite annoying. For example I couldn't set a breakpoint inside a class constructor function because the whole JS function wasn't source mapped.
-- J.
--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/5b8b733b-ef6c-4aaa-a071-d0bf4b027ca6%40googlegroups.com.
Thanks for the feedback Jens.On Mon, Sep 8, 2014 at 1:31 PM, Jens <jens.ne...@gmail.com> wrote:Any new bugs to report?Some things we have observed at work while using latest trunk SDM (compile per file):1.) If we don't use -noprecompile then SDM does not start because it says it has found more than one permutation. If we use -noprecompile then SDM starts and the first compile through the bookmarklet works as well. Our trunk build from 1st Sep still worked in both situations. With current trunk the precompile says that it can not set the locale property to "en" because only "de" was allowed, then tries a fallback value and finally the precompile fails.I'm working on a CL right now to opt -XcompilePerFile into the -noprecompile behavior for just the reason. Should be in today.
I'm working on a CL right now to opt -XcompilePerFile into the -noprecompile behavior for just the reason. Should be in today.
I've fixed two Gin generator related breakages like this so far. Are you sure this is occurring with HEAD? If so then there's definitely a bug in the "stale types marking" code that needs finding. If you can make a repro case I'll figure it out.
I'm working on a CL right now to opt -XcompilePerFile into the -noprecompile behavior for just the reason. Should be in today.Cool will try it tomorrow.I've fixed two Gin generator related breakages like this so far. Are you sure this is occurring with HEAD? If so then there's definitely a bug in the "stale types marking" code that needs finding. If you can make a repro case I'll figure it out.Currently I am not sure, need to ask colleague tomorrow. Can you tell me the commit hashes of your two fixes so I can see which of our builds contain them?
And a last question just popped up again: Is there any way to force embedded Jetty of CodeServer to not print out request logs at DEBUG level? Kind of annoying when all these progress requests show up between GWT logs.
---- J.
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/b841ccc9-4bea-4e73-9333-c9861308b33d%40googlegroups.com.
On Mon, Sep 8, 2014 at 3:00 PM, Jens <jens.ne...@gmail.com> wrote:And a last question just popped up again: Is there any way to force embedded Jetty of CodeServer to not print out request logs at DEBUG level? Kind of annoying when all these progress requests show up between GWT logs.i don't know, +skybrian
Maybe by configuring java.util.Logger? What does the message look like? (I assume you're passing -logLevel DEBUG to CodeServer? If so I haven't used DEBUG level.)
recentish ones are:267ad5efd00aae9b0f69eca793891e9fdad28e45 "Opts compilePerFile into noPrecompile to avoid >1 permutation."a43aa788cc2b78904c1bf6f0de9b8a1ebe78a6d2 "Fixes cascaded generator invalidation for inner classes."9da4d05b62d7d3cb48ccd03de7b4ad676e2318bd "Makes SDM+perFileCompile correctly handle switching browsers."7365570209426063bbc7fa4745e0b422e4fb4850 "Marks types generated by invalidated generators as "modified"."
This sounds like it might be a deadlock. Could you jstack to get a thread dump of the running process? It should tell us where it's stuck.
Yeah it is a deadlock: http://pastebin.com/WCVZc21E
Yeah it is a deadlock: http://pastebin.com/WCVZc21EHmm although it is not a java level dead lock. Seems like GWT can not close a jar file? Strange.
I've fixed two Gin generator related breakages like this so far. Are you sure this is occurring with HEAD? If so then there's definitely a bug in the "stale types marking" code that needs finding. If you can make a repro case I'll figure it out.