Performance Tuning on Crux Applications

No comments

We posted here about performance tuning on GWT applications some time ago. Now we want to talk about performance of applications created with Crux.

Firstly, we must remember that the Crux applications are also Web applications built on GWT. Thus, all tips we gave about performance on GWT applications are still valid.

On our post about GWT performance, we listed some common causes of performance issues. Now we want to shown how Crux can help you to handle them:

1. Java Collections API to handle a large amount of data.

To solve it, you can use Crux collection API. It uses the java Collections when runnig on Dev Mode and native arrays and maps for web mode.

2. RPC interfaces that declares very generic parameters

You need to take care with this in Crux, exactly as you do when coding directly with GWT.

3. Excessive number of accesses to the page DOM

When you declare an widget with Crux declarative engine, it will work in a way to maximize the performance. For the example of the HTMLPanel shown on our previous post, it will ensure that the panel is attached before add its children.

However, you must be aware when manipulating widgets programmatically.

4. Build all widgets eagerly

When you use Crux declarative engine, all invisible panels (or sections of panels, like Tabs or DisclosurePanels) are only rendered when visible or when they are accessed explicitly by application. However, you must be careful with this problem when creating widgets programmatically.

In addition of these problems, when coding with Crux you need to take care with:

  • Excessive number of cross-document calls or context accesses

When you make a call to a method on other document (using Invoker or CrossDocument), Crux needs to serialize and deserialize your parameters and exceptions thrown, exactly as happens when a RPC call is made to the server.

The same is true when you read or write informations from the Context.

So, you have to take care with your parameter types, as described previously, on the serverRPC topic.

No comments :

Post a Comment