18 август 2014, понеделник, 21:10:17 UTC+3, Roberto Lublinerman написа:
>
> 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.
>

Sounds interesting! However if you mean separate JavaScript file per Java 
class, wouldn't that generate too many Javascript files in case I have, 
say, refactor-renamed a heavily used method? Another approach is maybe each 
time to output a single JavaScript file, which contains the delta of the 
changes to the previous JavaScript file (i.e. some new functions and some 
function redefinitions). Then the browser uses the old JavaScript + the new 
one... Anyway, just thinking loud, you sure know the topic better than me...


>> 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).
>  
>

I think the out-of-date problem in option (1) does not happen so often in 
practice. 
Also, even if you do (2), the out-of-date problem is impossible to avoid if 
you use an in-IDE debugger like SDBG. Reason: SDBG is not really using the 
source files' copies you generate in the code server, but rather is opening 
and using directly the source files in the Eclipse project (and that's how 
it should be or else the integration between editing and debugging won't be 
so seamless). The DART Editor does it too, and I would assume JIDEA does 
the same.

So IMO the ideal solution would be if you serve the source files directly, 
and maybe keep the option to pregenerate the source files on disk if 
somebody is using an out-of-IDE debugger like ChromeDevTools and wants to 
avoid the out-of-date problem by all means.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/a374638a-d924-4977-b14b-80b7615b9721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to