Citrix performance problems

Citrix performance problems

Old forum URL: forums.lhotka.net/forums/t/4347.aspx


meierk posted on Thursday, February 14, 2008

I have developed my first CSLA winform application and have deployed it in a test environment on my clients citrix server.  The users run the application on Citrix via dumb terminals.  When the application starts up there are 4 tabs to choose from.  A different query is executed for each tab the user selects, and each query generally returns 1000 rows or less to readonly collections.

The problem is that when the screen refreshes after executing the queries, you can see the screen redraw from top to bottom - very slowly.  The Delphi application that this application is replacing redraws very fast in comparison.  The Delphi application was developed as a client-server app using ADO for data access to a single SQL Server 2000 database.  The new application is a 2-tier, CSLA application that acquires data from stored procedures in the same database.

My initial thought is that this is an issue with the way that winform applications run on Citrix, but I wanted to test this with the CSLA community first.  Has anyone else experience slow screen draws on Citrix and did you ever determine what the cause was?

I am also curious as different data portal deployment options and the performance benefits that I can realize from each.  For example, in the described Citrix environment, would I yield faster results by deploying as a remoting or enterprise application?

Thanks,
Kevin

meierk replied on Thursday, February 14, 2008

Forgot to mention that I have already read Rocky's article The costs and security benefits of n-tier over 2-tier so I believe that I have deployed the application using the faster data access method possible, but my question is more around deployment on Citrix than in general.  I don't think Citrix should make a difference, but I don't know a lot about Citrix and have read numerous articles discussing all sorts if Citrix related isses so I need to ask the question.

Kevin

amselem replied on Friday, February 15, 2008

I don't know Citrix but Terminal Services, and I think the issues found in both are similar

First, did you test the app without remoting the presentation layer? i.e. locally in the server, without Citrix involved.  If you find that it's still slow then the problem is in the app code (maybe you're executing one select for each row instead of one select for the full resultset).

So if the redrawings problems are only found in the citrix clients, you should try to reduce the bandwith consumed between the server and them,  maybe lowering the screen resolution and/or the color depth. The application is being executed fully at the server so it doesn't matter if your loading 10 or 10000 rows, think on Citrix/TS applications like a video streaming that is sent to the dumb client, the higher quality the poorer performance. The client sents keystrokes and mouse clicks and the server responds with an updated screen of the app but the client is only seeing a bitmap, he doesn't know anything about the underlying logic nor data .

Said that, my experience is that some .NET controls that use intensively GDI+ are far slower when redrawing than the old GDI ones (probably your old Delphi app is using GDI), and that is very evident in citrix/TS environments. Try to use as much as possible the standard textbox/datagrid from MS and avoid custom drawings/themes/skins/fancy bitmaps!

HTH
amselem.

rsbaker0 replied on Friday, February 15, 2008

meierk:
... A different query is executed for each tab the user selects, and each query generally returns 1000 rows or less to readonly collections.

The problem is that when the screen refreshes after executing the queries, you can see the screen redraw from top to bottom - very slowly...

A 1000 rows is nothing nowadays. If you are seeing the screen redraw from top to bottom (e.g. in a grid), I would suspect some sort of performance issue in your property "getters".  Are you implementing CanReadProperty() with some sort of authorization framework?

JonM replied on Monday, February 18, 2008

I've seen very poor performance on the DataGridView if I have the AutoSizeColumnMode property set while the grid is refreshing.  I find it best to have set to none and then manually call the AutoResizeColumn method on the grid after the grid has loaded.

 

Jon 

meierk replied on Monday, February 18, 2008

It turns out that the original Delphi app dynamically built queries to filter the data for each tab.  The new .net application was getting all data and filtering based on filter criteria while iterating over the result set and adding items to the collection.  By moving the filtering back to the queries, I have nearly the same performance as the Delphi app.

What I still don't understand is why I didn't see this during development.  My development database is a duplicate of the users test database and my local SQL Server has a lot less memory and processor power that the users SQL Server.  On my development machine, the draws were always instant.

Thanks to all that took the time to answer.

Kevin

richardb replied on Tuesday, February 19, 2008

I've had similar performance issues with Citrix with a VB6 application.

It came down to the UI and how the controls refreshed and painted, especially when filling grids up with data.  As I recall, as each row was added that caused Citrix to refresh and send it down the wire to the client which generated alot of network traffic.  We mucked about with the controls to stop this just cause a paint once after the grid was populated and it was much better.

 

katikan replied on Monday, March 17, 2008

I have a similar requirement @ our shop - where we need to fill the datagridview with all the data from the db2 database on z/OS. Our application is written in C#.Net + DB2 db(2-tier) based on .Net 2.0 framework.

we have a treeview control with a list of tables and 5 tabs to the right. When the user picks a table, we need to fill the tab with the data from the db2 table. We are filling the datagridview on the UI. We hosted the application on the citrix server.

We are noticing some performance problems and loosing some screen resolution and colors on the UI....When the application is launched from one of the users PC - it runs fast and when used with Citrix PN Client - the application is slow.

Please advice on this problem - we are in development and need this problem resolved ASAP - thanks for your help, ahead of time!

Copyright (c) Marimer LLC