Re: Client bundle increase script size by 300kb!
yeah, code spliting is probably the solution... I was hopping a way to apply clipping information on any image. Probably a bad idea ;) Le jeudi 5 juillet 2012 19:42:45 UTC+2, Joseph Lust a écrit : Kroc, This is how ClientBundle is intended to work. I bet that loading 300KB is faster than loading 2000 separate images (~200 packets vs ~4000, assuming 1514B MTU). Consider using code splitting to break out your image resources into separate bundles so that they are loaded as needed by different modules. That way you won't need that 300KB download up front. See this recent posthttps://groups.google.com/forum/?fromgroups#!searchin/google-web-toolkit/speed/google-web-toolkit/CVvq7tfZUpQ/QbexjSr_APQJabout how to cut down on initial download side. Sincerely, Joseph -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/sa17pMDCM0MJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Client bundle increase script size by 300kb!
Hello, Im using ClientBundle with a lot of picture (around 2000 picture divided into 36 bundles). I've disabled data inlining with such option: set-property name=ClientBundle.enableInlining value=false / But the resulting script increase from 500kb (without bundle) to 800kb (with bundle) It include such generated lines: function lHb(){lHb=m3d;SEb();cEb=new Rxd((wyd(),new syd(nDb)),1140,0,228,120)} function YOb(){YOb=m3d;DMb();PLb=new Rxd((wyd(),new syd($Kb)),1140,0,228,120)} function u2b(){u2b=m3d;__b();l_b=new Rxd((wyd(),new syd(w$b)),1140,0,228,120)} function I2b(){I2b=m3d;__b();z_b=new Rxd((wyd(),new syd(w$b)),3810,60,114,60)} function G2b(){G2b=m3d;__b();x_b=new Rxd((wyd(),new syd(w$b)),3924,60,114,60)} I understand the reason for this code to be generated, but it is a waste of space in my specific case: All bundles are almost identic (only color variation) then all images cliping information are unnecessarily repreated. Does anyone facing the same issue ? Any idea to get rid of theses 300kb ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/422cDX0lro0J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Is gwt serialization backward compatible ?
any ideas or advises ? On 23 mar, 14:04, Kroc vincent.legen...@gmail.com wrote: I've serialized data with standard java way into files and database. As I'm dicovering RPC.encodeResponseForSuccess to inject data in web pages, I wondered to know if it's safe to store GWT serialized data into files and blobs for future use (either on client and server side) ? And if yes, is gwt (de)serialization procedure slower than stadard java serialization ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Is gwt serialization backward compatible ?
I've serialized data with standard java way into files and database. As I'm dicovering RPC.encodeResponseForSuccess to inject data in web pages, I wondered to know if it's safe to store GWT serialized data into files and blobs for future use (either on client and server side) ? And if yes, is gwt (de)serialization procedure slower than stadard java serialization ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: (InternalError): script too large on FF
I workaround this problem: In fact my rpc call was too large (around 1Mo). So I simply reduce the size of theses calls to 10Ko. Vincent On 13 nov, 09:08, Kroc [EMAIL PROTECTED] wrote: Does anyone had this error on firefox (windows): compiled in PRETTY mode (file size 1.2Mo): (InternalError): script too large fileName:http://localhost:8080/nc.kroc.fmp.AppMain/F7CD321583D7FFF355626DFABFB... lineNumber: 4099 stack: $prepareToR same compiled in OBFUSCATED mode (file size 444Ko): (InternalError): script too large fileName:http://localhost:8080/nc.kroc.fmp.AppMain/58FEAEBA24ED94C41276805F8F8... lineNumber: 444 stack: vub()@:0 eval( in hosted mode and IE script continue running for a while. And it's working with chrome. The only difference with my previous versions which was working, is a library replacement: h4gwt 1.1 - gilead 1.2 (simply a version changed) I didn't notice any script file size changed between the two versions. I found this on mozilla.org (http://www.mozilla.org/js/spidermonkey/ release-notes/JS_150_RC4.html) : Bug 80981 Need extended jump bytecode to avoid script too large errors, etc. We now ReportStatementTooLarge only if: - a jump offset overflows 32 bits, signed; - there are 2**32 or more span dependencies in a script; - a backpatch chain link is more than (2**30 - 1) bytecodes long; - a source note's distance from the last note, or from script main entry point, is 0x7f bytes. So... Is this problem already reported ? Anyone's ideas ? Regards Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
SyntaxError in RPC deserialisation process
Durring a standard RPC call I have the following error on IE (and hosted mode GWT 1.5.2): [ERROR] (SyntaxError): Identificateur attendu number: -2146827278 description: Identificateur attendu com.google.gwt.core.client.JavaScriptException: (SyntaxError): Identificateur attendu number: -2146827278 description: Identificateur attendu at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.eval (Native Method) at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead (ClientSerializationStreamReader.java:57) at com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.createStreamReader (RemoteServiceProxy.java:178) at com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.createStreamReader (RemoteServiceProxy.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived (RequestCallbackAdapter.java:197) at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl (Request.java:254) at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch (Request.java:226) at com.google.gwt.http.client.Request.fireOnResponseReceived (Request.java:217) In fact on of my object had a string with an 'é' char and then the serialised string look like this: [0,14,1.2240656 [...] n_failed.html,atterrisage rat?,0,5] If I replace the 'é' with a simple 'e', everything is working well : [0,14,1.2240656 [...] n_failed.html,atterrisage rate],0,5] Is this error already reported ? How can I fix that error ? Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
(InternalError): script too large on FF
Does anyone had this error on firefox (windows): compiled in PRETTY mode (file size 1.2Mo): (InternalError): script too large fileName: http://localhost:8080/nc.kroc.fmp.AppMain/F7CD321583D7FFF355626DFABFB302AC.cache.html lineNumber: 4099 stack: $prepareToR same compiled in OBFUSCATED mode (file size 444Ko): (InternalError): script too large fileName: http://localhost:8080/nc.kroc.fmp.AppMain/58FEAEBA24ED94C41276805F8F8BB750.cache.html lineNumber: 444 stack: vub()@:0 eval( in hosted mode and IE script continue running for a while. And it's working with chrome. The only difference with my previous versions which was working, is a library replacement: h4gwt 1.1 - gilead 1.2 (simply a version changed) I didn't notice any script file size changed between the two versions. I found this on mozilla.org (http://www.mozilla.org/js/spidermonkey/ release-notes/JS_150_RC4.html) : Bug 80981 Need extended jump bytecode to avoid script too large errors, etc. We now ReportStatementTooLarge only if: - a jump offset overflows 32 bits, signed; - there are 2**32 or more span dependencies in a script; - a backpatch chain link is more than (2**30 - 1) bytecodes long; - a source note's distance from the last note, or from script main entry point, is 0x7f bytes. So... Is this problem already reported ? Anyone's ideas ? Regards Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to use any external java API in GWT application
A Gwt application is compiled into javascript and run on client browser, then it isn't possible to directly call any external java API (well, you can if that api is also compiled into javascript). Instead, your GWT application have to call a server service which call your API. To do that you can use any kind of request (see HTTPRequest class) but it's by far easier to use a GWT RPC call. Vincent On 29 sep, 06:56, Manish Kumar [EMAIL PROTECTED] wrote: Hi, i am new to this GWT, i searched the net also for my problem but didnt got any solution. In my gwt application there is a textbox. i m calling weblogic APIs to get some value from weblogic server, and i want to put that value in that gwt textbox. But it seems like it is not possible in gwt..is it.. !!! i have put weblogic.jar file in the gwt application classpath. please help me to do this. Thanx, Manish Kumar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
NullPointerException in GWTCompiler
Does anybody already had this kind of error while compiling your project ? If yes how did you solve your problem ? [echo] Compiling client menu [java] Compiling module nc.kroc.fmp.AppMenu [java] Compilation succeeded [java] Linking compilation into D:\Documents\Vincent\workspace \FullMetalPlanet\build\nc.kroc.fmp.AppMenu [java] Exception in thread main java.lang.NullPointerException [java] at com.google.gwt.dev.util.Util.copy(Util.java:994) [java] at com.google.gwt.dev.util.Util.copy(Util.java:181) [java] at com.google.gwt.dev.util.Util.copy(Util.java:166) [java] at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.link(StandardLinkerContext.java: 284) [java] at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:367) [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java: 564) [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java: 554) [java] at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java: 214) BUILD FAILED D:\Documents\Vincent\workspace\FullMetalPlanet\build.xml:102: Java returned: 1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Sharing the localization code between client and server
I'm also looking for this kind of 'smart factory' to use localization in my shared code. One easy way (which is good enough for me), is MY.create() return GWT.create() on client side and null on server side... This solution may lead to null pointer exception. If you find an elegant solution, please share it. Thank Vincent On 22 sep, 10:04, Dobes [EMAIL PROTECTED] wrote: Hm, I see. But would I be able to use GWT.create(...) to create the Constants subclass, and have it honor my @DefaultStringValue() annotations? I suppose not, so maybe I'd have to come up with some kind of clever factory scheme which uses GWT.create in client code and whatever my own implementation is in server code. I guess I'll have to give this some more thought, the code to work around this with extra client and server code that generates its own strings instead of generating strings in shared code might still be less work that implementing my own fancy GWT shared i18n stuff. On Sep 21, 6:13 am, Lothar Kimmeringer [EMAIL PROTECTED] wrote: Dobes schrieb: I like the way GWT does it's localization and it would be great if I could use the same code in client AND server (especially, use it in my code that is shared between client and server). Any idea how possible this is? Actually there is no problem at all (OK there are two ;-) On the server-side just create a resource-bundle, that is reading in the property-files used by GWT to create the localized HTML-pages. Here comes the first problem. The property-files used for GWT must be encoded in UTF-8, Java's resource-bundle expects ISO-8859-1. But there are implementations out there that can be used (GWT is using one as well that is mentioned in the docs, so you might try that one out as well). The other problem is that the algorithm used for loading the correct resource-bundle differs from the one used in GWT. Giving a Locale of e.g. en_US and the following available resource-bundles - file_de.properties - file.properties GWT loads file.properties all the time where Java loads the de-files if the System-Locale is DE. As well, the default-Locales of GWT for some languages are different (AFAIK en_US instead of en_EN and es_AG instead of es_ES) leading to funny effects when localizing e.g. currencies. Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why servlet?
Basically a servlet is a java class which response to any http browser request by sending back data to this browser. You can compare a servlet to a php page. More info here http://en.wikipedia.org/wiki/Java_Servlet The main GWT feature is the java to javascript compiler to build your client side application… nothing to do with servlet in fact! But real applications need interactions with server to load/save data into a database for example. So GWT provide a basic API to exchange data with any web server. As client is written in java, it’s easier to write your server side code in java too. That’s why a more advanced API exist (see RPC) to call a java method located on your server. Off course, your web server must include a JVM to run java code: have a look on tomcat for that. Vincent On 1 sep, 13:47, Dmitriy R [EMAIL PROTECTED] wrote: I noticed that GWT includes a servlet. What is a purpose of servlet? How it can be deployed? Any restrictions to supported servlet containers? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---