Re: performance problem on andorid using phonegap

Skip to first unread message


Oct 29, 2012, 6:06:48 PM10/29/12
Andrea to help you more information are needed.

Can you show how do you attach event, create widgets and populate the DOM ??

Thank you.

Il giorno lunedì 29 ottobre 2012 11:07:13 UTC+1, andrea casati ha scritto:
hi all guys!

i develop a very small application to test gwt the first using MVC i create a button and a teextarea, pressing the button the number in the textfiel growing up

this is the entry point:

public void onModuleLoad() {


ModelP model = new ModelP();


ViewP view = new ViewP(model);


ControllerP controller = new ControllerP(model, view);


in the model there is a varaible and a function to increment the variable;

in the view there is simply a button and a textarea

in the controller there is a clickListener that listens the button and increment the variable.. very simple a stupid program, non css , non html changes.. nothing..

i only add this line   <inherits name=''/> in the xml to maintain the compatibility with android ICS..

when i run this program in my android ics phone (512ram, 1ghz cpu) using phonegap the program is terribly slow (on the pc is perfectly fast), i mean…if i press the button, the textfield 

growing up after 1 second!  :(

can you help me? :)

thanks a lot!

andrea casati

Oct 30, 2012, 4:40:48 AM10/30/12
ok, sorry :(
this is the controller:

public class ControllerP {

private ModelP model;

private ViewP view;

ControllerP(ModelP model, ViewP view) {

this.model = model;

this.view = view;

view.addButtonListener(new ButtonListener());


class ButtonListener implements ClickHandler {


public void onClick(ClickEvent event) {






this is the model:

public class ModelP {

public int i;

public ModelP() {

i = 0;


public void incrementI() {





this is the view:

public class ViewP {

public TextBox textBox;

public ModelP model;

public Button button;

public ViewP(ModelP model) {

this.model = model; 

textBox = new TextBox();

textBox.setText("hello world!");


button = new Button("click");





public void addButtonListener(ClickHandler handler) {



public void aggiornaI() {





the css for the textBox and the button position:

#button_container {

position: absolute;

top: 6em;

left: 1em;


#text_container {

position: absolute;

top: 6em;

left: 10em;


and finally in the html file i add only this:

<div id="header_container"></div>

<div id="button_container"></div>

<div id="tab_container"></div>

<div id="text_container"></div>

<div id="image_container"></div>

very very simple, and very fast on the pc..but on the phone is incredibly slow

thanks a lot for the help!

Reply all
Reply to author
0 new messages