Thursday, May 31, 2012

Improving performance in Domino Designer when developing XPages

If the XPage has a view data source/the view name is a static value, it looks like Domino Designer is constantly polling the view for column info/etc.

If you are done dragging and dropping columns from the view to the view panel/etc. Go into source mode and compute the viewName.


<xp:dominoView var="view1" viewName="MyView" />


<xp:dominoView var="view1" viewName="${javascript:return 'MyView'}" />

When the view name is computed, Domino Designer can't determine what view it should check -> No more lag.

I haven't tested this with Document Data source, but you might get a performance boost if you compute the formName as well, as Domino Designer won't have to check the fields for drag/drop.

Optimally I would wish the Designer team implemented a refresh fields/columns button for the data pane.

Share and enjoy!


Philippe Riand said...

Although it might appear as negligible, this comes with a runtime penalty. It also fills the compiled expression cache with a new entry.
I would avoid this, when possible.

Tommy Valand said...

What you're describing seems like really neglible compared to having to wait 20-30 seconds when switching between XPages with view data source, 5 seconds per character when typing something in a control (e.g. SSJS) and 5-10 seconds when setting focus to a control.

What I described was what a colleague of mine encountered on his first encounter with XPages (adding functionality to existing app). It wasn't exactly a motivating experience :)

If someone (wink wink) convinced the designer team to replace the extreme polling on design information for the data pane(?), and added a refresh button instead, these stupid workarounds wouldn't be needed.

Don Mottolo said...

I second what Tommy wrote -- Waiting for DDE while working with a view control is painful, especially if the database is on a server and contains a lot of documents.

This is a serious (probably the worst) stumbling block for new XPage developers!

Unknown said...

Nice one, i like it.

You would have to turn it back for a second though, if you are changing to categorized in a column for notes to recognize it correctly, but other than that it saves a lot of time for me, too.

Thanks alot!

Mikael Andersson said...

This was a really useful tip.
the "downside" is that the bind between columns disappears, the dropdown is not populated with the available columns.
this, however, can be done by checking the view columns program name
I'd rather have a fast editor when designing than have to wait...