Re: [gwt-contrib] Potentially simple optimization when creating ObjectLiterals

2016-05-01 Thread 'Ray Cromwell' via GWT Contributors
A quick fix would be, in a linker, to substitute "new $wnd.Object"
with "{}". It's possible to write a peephole pass to fix this in the
Compiler, but I think given the number of people clamoring for GWT 2.8
and the other more pressing issues, this would be low on the totem
pole.


On Sun, May 1, 2016 at 6:30 AM, Paul Stockley  wrote:
> When you define an object literal as
>
> @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
> public class SomeObjLiteral {
>
> }
>
>
> Calling new on this results in the following javascript code 'new
> $wnd.Object'. You could just emit {} instead.
>
> It is surprising the number times you see this code especially for React
> code bases and when dealing with JSON structures.
>
> Is it worth filing an issue?
>
> --
> 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/e1388465-ce9f-4bd9-8846-d4de7dc635f8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAPVRV7d1U4LvBySTrw2Lh_ao%3D2Bme9T%2BBAk1u%3DSy%2BxGtfKa6Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: How to unit test JsInterop code

2016-05-01 Thread Thomas Broyer


On Sunday, May 1, 2016 at 5:46:26 PM UTC+2, Jens wrote:
>
> Depending on what exactly you want to test I would try hard using plain 
> JUnit with mocking / stubbing. Testing @JsType(native = true) annotated 
> interfaces / classes probably does not make a lot of sense given that the 
> underlying JS code should already be tested and given that GWT itself has 
> tests to ensure that JsInterop works correctly. 
>
> But in general GWTTestCase should just work with JsInterop because they 
> should be executed in web-mode by default now.
>

I think you *have* to run them in prod mode though (this is now the 
default, but in case your gwt.args contains an explicit -devMode, you may 
want to remove it or replace it with -web or -prod) 

-- 
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/73974bec-3e59-4b92-8553-004b29069624%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: How to unit test JsInterop code

2016-05-01 Thread Jens
Depending on what exactly you want to test I would try hard using plain 
JUnit with mocking / stubbing. Testing @JsType(native = true) annotated 
interfaces / classes probably does not make a lot of sense given that the 
underlying JS code should already be tested and given that GWT itself has 
tests to ensure that JsInterop works correctly. 

But in general GWTTestCase should just work with JsInterop because they 
should be executed in web-mode by default now.

-- 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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/154e0a3f-5c8a-4f51-92db-4febf3b7fca2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: RAM memory continously increasing while using GWT Application in IE Browser

2016-05-01 Thread Velusamy Velu
This is what I typically do in such circumstances, may work in your case 
too.  Pardon me if this appears to be "preaching the choir".

Step 1 - Detect which component leaks memory

I will disable the code behind each component, one by one.  The last 
component disabled that stopped the memory leak may be the culprit.


Step 2 - Create a POE (Proof of Error)

This will be a whittled down component, hoping to retain the memory leak 
still, will be easy to diagnose by myself.


Step 3 - If step 2 fails share the code in a forum like this (I'm hoping it 
would be OK to share at this point) and ask for help.

This has worked for me so far.  I hope it will help you too.

You may also want to try GWT 2.7, as Daniel Kurka has suggested.

On Sunday, May 1, 2016 at 5:51:04 AM UTC-4, thamarai kannan wrote:
>
> Hi Velusamy sir,
>
> sorry, I can not share the code. Is there any other way to find the 
> root cause and fix.
>
>
>
> On Friday, April 29, 2016 at 7:23:30 PM UTC+5:30, Velusamy Velu wrote:
>
>> Thamarai Kannan:
>>
>> Any reason you chose GWT 2.5.1 instead of the latest version?  As 
>> Gilberto responded it would be easier to pinpoint the problem if you could 
>> share your code, unless you are restricted.
>>
>> On Monday, February 15, 2016 at 5:05:18 AM UTC-5, thamarai kannan wrote:
>>>
>>> Hi, I am using GWT Application. for this application I am using IE10. 
>>> While lading another screen or reloading same page my RAM Memory increasing 
>>> continously. Approximately each load 5MB RAM memory consuming. Anyone help 
>>> me to free this memory space at the time of loading.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] How to unit test JsInterop code

2016-05-01 Thread Paul Stockley
What is the best way to unit test JsInterop code? Am I correct that 
GWTTestCase doesn't work?

-- 
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/b13a8f75-d6c7-400e-b93e-bf9fb547d6be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Potentially simple optimization when creating ObjectLiterals

2016-05-01 Thread Paul Stockley
When you define an object literal as

@JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object")
public class SomeObjLiteral {

}


Calling new on this results in the following javascript code 'new $wnd.Object'. 
You could just emit {} instead. 

It is surprising the number times you see this code especially for React code 
bases and when dealing with JSON structures. 

Is it worth filing an issue?

-- 
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/e1388465-ce9f-4bd9-8846-d4de7dc635f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Creating an Array class using Interop

2016-05-01 Thread Paul Stockley
I am trying to create a native JsType to represent a javascript Array. Up 
to this point I have been using JSNI. Below is the outline of what I have. 
I want to use an Interface as my eventual goal is to be able to define JSON 
structures using the same class on client and server.

@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Array")
public interface Array {
 

   @JsOverlay
   default T get(int index) {
  return JSHelper.getArrayValue(this, index);

   }


   ...Rest of native methods


*}*


The Helper.getArrayValue method maps to a native function I define outside of 
GWT. I have been trying to track down an error that

only happened in SDM. When I called the get method, I would get the following 
error:



*ArrayTest.java:14Uncaught ReferenceError: S$c_g$ is not defined*


On a side note, tracking down these kind of problems is a real pain given that 
all the function names are obfuscated in SDM. 

I tried -XmethodNameDisplayMode ABBREVIATED. However, this only works for 
methods defined in my modules. Is there another

way to turn off obfuscation?


Anyway, it turns out the problem is the following line I had in may gwt.xml file





I had this to strip out cast checking from my final production compile. If I 
remove this, it works fine.



-- 
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/26f49d6c-a5fc-4dbe-9f9e-840be96a2f1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: RAM memory continously increasing while using GWT Application in IE Browser

2016-05-01 Thread Daniel Kurka
I vaguely remember fixing a bug around IE10 and tables in GWT. So if that
code is using a HtmlTable or FlexTable I suggest upgrading to GWT 2.7 at
least.

On Sun, May 1, 2016 at 11:51 AM thamarai kannan 
wrote:

> Hi Velusamy sir,
>
> sorry, I can not share the code. Is there any other way to find the
> root cause and fix.
>
>
>
> On Friday, April 29, 2016 at 7:23:30 PM UTC+5:30, Velusamy Velu wrote:
>
>> Thamarai Kannan:
>>
>> Any reason you chose GWT 2.5.1 instead of the latest version?  As
>> Gilberto responded it would be easier to pinpoint the problem if you could
>> share your code, unless you are restricted.
>>
>> On Monday, February 15, 2016 at 5:05:18 AM UTC-5, thamarai kannan wrote:
>>>
>>> Hi, I am using GWT Application. for this application I am using IE10.
>>> While lading another screen or reloading same page my RAM Memory increasing
>>> continously. Approximately each load 5MB RAM memory consuming. Anyone help
>>> me to free this memory space at the time of loading.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: RAM memory continously increasing while using GWT Application in IE Browser

2016-05-01 Thread thamarai kannan
Hi Velusamy sir,

sorry, I can not share the code. Is there any other way to find the 
root cause and fix.



On Friday, April 29, 2016 at 7:23:30 PM UTC+5:30, Velusamy Velu wrote:

> Thamarai Kannan:
>
> Any reason you chose GWT 2.5.1 instead of the latest version?  As Gilberto 
> responded it would be easier to pinpoint the problem if you could share 
> your code, unless you are restricted.
>
> On Monday, February 15, 2016 at 5:05:18 AM UTC-5, thamarai kannan wrote:
>>
>> Hi, I am using GWT Application. for this application I am using IE10. 
>> While lading another screen or reloading same page my RAM Memory increasing 
>> continously. Approximately each load 5MB RAM memory consuming. Anyone help 
>> me to free this memory space at the time of loading.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.