Question: I am new to Java GWT plugins.

In our code, we are using code like below,

In test1.java

```
public class RowResults extends Composite
{

   @UiField VerticalPanel vpnlWidgets;

   public RowResults()
   {

 uiBinder.createAndBindUi(this)); 
 getRows();
   }

   private void getRows()
   {

      for(RowDetails obj: RowDetailsArray)
      {
         RowWidget row= new RowWidget(obj);
      vpnlWidgets.add(row);
      }
   }
}

```

In test2.java

```
public RowWidget(RowDetails rowObj)
{

       uiBinder.createAndBindUi(this);  
       this.Row = rowObj;
}

```

I have posted here some necessary code. In this code, if I have 10 elements in RowDetailsArray, then for each elements createAndBindUi is called. It seems somewhat slow also.

Is there any way to call uiBinder.createAndBindUi(this); function one time and use that for all the 10 elements.

Also, what will happen while calling createAndBindUi(this). Whether it convert ui.xml file to class file or some thing else.

Pls Correct me if I am wrong.,

Thanks in Advance.

Answer: 
There should be no performance penalty.

Simplifying complex queries is what views are for.

If performance is something you are concerned about - read about [indexed views](http://msdn.microsoft.com/en-us/library/dd171921%28v=sql.100%29.aspx) in SQL Server:

> 
> indexed views provide additional performance benefits that cannot be achieved using standard indexes. Indexed views can increase query performance in the following ways:
> 
> 
> * Aggregations can be precomputed and stored in the index to minimize expensive computations during query execution.
> * Tables can be prejoined and the resulting data set stored.
> * Combinations of joins or aggregations can be stored.
> 
> 
>
Generally you shouldn't expect performance differences but check the execution plans for your queries.

If you are joining Views onto Views then the execution plans can be sub optimal and contain repeated accesses to the same table that could have been consolidated. Also there can be issues with views and [predicate pushing](http://jahaines.blogspot.com/2010/03/performance-tuning-101-what-you-will_17.html).