No, I have not.I did try another XML parser https://sites.google.com/site/gwtcomponents/simplexmlparser and then I tried the same file as JSON with JSONParser. I'm so confused. Both increased the memory same or even more, but they did have a cap how much memory is consumed (it was about 5-7MiB for JSON) which is never released on Android default browser or Chrome(Nexus 7), but on desktop Chrome browser it did release it after a while. I'm really starting to doubt garbage collection effectiveness...
keskiviikko, 11. joulukuuta 2013 16.15.53 UTC+2 Thomas Broyer kirjoitti:
-- All I want is to read a lot of XML / JSON files on Android devices without permanently increasing the memory consumption :(
Relevant code:
new TapHandler() {
@Override
public void onTap(TapEvent event) {
JSONParser.parseStrict("Same XML converted as JSON");
}
});
keskiviikko, 11. joulukuuta 2013 16.15.53 UTC+2 Thomas Broyer kirjoitti:
Have you tried replicating this with pure JS ? (if the leak appears in pure JS, then GWT can't make it better; otherwise it'd mean the leak comes from GWT)
On Wednesday, December 11, 2013 12:24:58 PM UTC+1, Timo wrote:Hello,I've a GWT application that's used on mobile devices either as a web-app or installed application with PhoneGap. I noticed that whenever you use XMLParser.parse("XML stuff") it will use a "significant" amount of memory and is almost never released fully. I tested this by putting a taphandler on a button that does nothing but parses a 430 line XML file. like this:taskListButton.addTapHandler(new TapHandler() { @Overridepublic void onTap(TapEvent event) {XMLParser.parse("XML FILE as String...");}});When I pressed that button 5-10 times it would increase memory usage by ~1MiB. As my application uses a lot of XML-messages it will increase memory usage continuously, it might release some after a while when the memory usage is already high. I don't know what triggers the memory release.I tested this on Chrome Desktop and I can see on the Debugger Tools Timeline that document count increases by 1 and DOM node count by ~800 with each click of the button. With 25mins testing it did clear all of these from the DOM (at ~2min), but after that they were not cleaned. Can I somehow manually remove this from memory or trigger cleaning?Timo
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment