473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very slow rendering of tabs

Hello,

I have a small application which acts like a wizard with 5 steps. I
use a tab control, and 'back' and 'next' buttons to switch between the
5 tabs (1 tab page for each step). The components on each tab are very
light (mostly labels and input fields) and my C# code (the actual
program logic) is well optimized. I also use multi threading to
separate the UI from the core of the app.

The rendering of the each tab page when I click 'next' is unacceptably
slow even on a very fast machine. Each time a new tab page becomes
active, the screen flickers a lot in the transition and it takes a few
moments (my guess is half a second). Clicking on the tab page
directly, instead of using a button, doesn't affect the speed.

Is there a way to speed up this thing or are Windows Forms used this
way bound to be very slow? All I need is a responsive UI. Is there an
easy way to preload them or pre-paint the pages at load time? It looks
like the repaint when a tab page becomes active, is what takes most of
the execution time.

Thank you.
-- Ruby

Oct 2 '07 #1
4 6559
Hi,

You will have to post some code to see how you are creating your tabs.
You are not creating the controls when you show the tab are you?

<ru********@gma il.comwrote in message
news:11******** *************@5 7g2000hsv.googl egroups.com...
Hello,

I have a small application which acts like a wizard with 5 steps. I
use a tab control, and 'back' and 'next' buttons to switch between the
5 tabs (1 tab page for each step). The components on each tab are very
light (mostly labels and input fields) and my C# code (the actual
program logic) is well optimized. I also use multi threading to
separate the UI from the core of the app.

The rendering of the each tab page when I click 'next' is unacceptably
slow even on a very fast machine. Each time a new tab page becomes
active, the screen flickers a lot in the transition and it takes a few
moments (my guess is half a second). Clicking on the tab page
directly, instead of using a button, doesn't affect the speed.

Is there a way to speed up this thing or are Windows Forms used this
way bound to be very slow? All I need is a responsive UI. Is there an
easy way to preload them or pre-paint the pages at load time? It looks
like the repaint when a tab page becomes active, is what takes most of
the execution time.

Thank you.
-- Ruby

Oct 2 '07 #2
On Oct 2, 1:52 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
Hi,

You will have to post some code to see how you are creating your tabs.
You are not creating the controls when you show the tab are you?
Hi Ignacio,

the controls are all created at design time. The only thing that
happens at run time is the addition of the page and the selection of
the active tab. When one clicks on 'next' the code invoked is the
following:

private void OpenNext()
{
TabPage currentOne = mainTab.Selecte dTab;
switch (current.Text)
{
case "Step A":
if (!mainTab.TabPa ges.Contains(Pa geB))
mainTab.TabPage s.Add(PageB);
mainTab.Selecte dTab = PageB;
break;
case "Step B":
if (!mainTab.TabPa ges.Contains(Pa geC))
mainTab.TabPage s.Add(PageC);
mainTab.Selecte dTab = PageC;
break;
//...
}
}

I tried to select a tab that was already added and it doesn't change
the speed.

Further investigation shows that this flickering effect is no longer
there and the pages load instantly if I remove the background image
that is loaded for each tab. Is there a way to have it loaded very
fast?

Thanks.
-- Ruby

Oct 2 '07 #3
Could it be that your background picture is of much higher resolution than
needed? Try lowering the resolution to see how it affects speed and look...

Cheers,
Johnny J.


<ru********@gma il.comwrote in message
news:11******** **************@ 57g2000hsv.goog legroups.com...
On Oct 2, 1:52 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
>Hi,

You will have to post some code to see how you are creating your tabs.
You are not creating the controls when you show the tab are you?

Hi Ignacio,

the controls are all created at design time. The only thing that
happens at run time is the addition of the page and the selection of
the active tab. When one clicks on 'next' the code invoked is the
following:

private void OpenNext()
{
TabPage currentOne = mainTab.Selecte dTab;
switch (current.Text)
{
case "Step A":
if (!mainTab.TabPa ges.Contains(Pa geB))
mainTab.TabPage s.Add(PageB);
mainTab.Selecte dTab = PageB;
break;
case "Step B":
if (!mainTab.TabPa ges.Contains(Pa geC))
mainTab.TabPage s.Add(PageC);
mainTab.Selecte dTab = PageC;
break;
//...
}
}

I tried to select a tab that was already added and it doesn't change
the speed.

Further investigation shows that this flickering effect is no longer
there and the pages load instantly if I remove the background image
that is loaded for each tab. Is there a way to have it loaded very
fast?

Thanks.
-- Ruby

Oct 3 '07 #4
ru********@gmai l.com wrote:
Further investigation shows that this flickering effect is no longer
there and the pages load instantly if I remove the background image
that is loaded for each tab. Is there a way to have it loaded very
fast?
I've notice the flickering effect issue on several .NET apps when using
customized backgrounds. It doesn't take kindly to redraws for whatever
reason.

What type of image are you using as the background? Are they JPEGs, or
BMP/PNG? The former tends to load a lot faster and have smaller file
sizes (hence its proliferation on the Internet), while the latter are
non-lossy formats, meaning all of the original image data will remain.

Chris.
Oct 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3441
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with a Cisco 678 router using NAT and static port maps. Two switches between webserver and Cisco. Problem: Accessing PHP driven site via any computer...
0
3341
by: threecrans | last post by:
If you create a new server control, and override the Render method with the following code: protected override void Render(HtmlTextWriter output) { // <TABLE id="mytable"> output.AddAttribute(HtmlTextWriterAttribute.Id, "mytable"); output.RenderBeginTag(HtmlTextWriterTag.Table); // <TR>
5
2182
by: vMike | last post by:
Is there any benefit to stripping all the space from the page before rendering by overriding the page render and using the htmltextwriter and stringbuilder to strip linefeeds, tabs and extra space etc. I have noticed that may site's source code is like this. Is this because it is better for the browser or harder for someone to be able to read...
7
4923
by: wardy | last post by:
Hi, I'm hoping someone can lend me a hand....I've got a .NET Web app running on Windows 2000 IIS 5.0 linking to a SQL Server 2000 database. When the database is located on the same server as the web app, the pages render quickly - however, when I run the app with the database on its own server, the page rendering takes anywhere from 5-8...
3
6145
by: DalePres | last post by:
I have an application that uses the Microsoft.Web.UI.WebControls.TabStrip and Multipage controls. When I test the app on my pc or on my client's development web servers the controls render properly. When I deploy the app to the test environment - supposedly an exact duplicate of the development environment - the TabStrip and Multipage...
2
1188
by: Peter Proost | last post by:
Hi group, I've got the following problem, a colleague has got an application that runs real slow, it has a grid with about 28.000 records and ofcourse that will cost him some speed, but the weird thing is from the grid form he opens a detail form with a lot of controls on it (a tabcontrol with about 9 tabs all containing textboxes, labels...
9
1381
by: Elliot Rodriguez | last post by:
WinXP Pro Let me preface this by saying I have developed with the .NET IDE since its release, and I consider myself reasonably savvy with it. I have a medium sized form with about 120 controls - 60 labels and the rest are DropDownLists and TextBoxes. Almost every TextBox or DropDownList is placed in a Panel control whos visibility...
0
1377
by: Jeff Morgan | last post by:
I have an application that runs on ASP.NET. We have been working through performance testing and it appears that at about 40-50 users, I start to get CPU bound. The application is a three form, ASP.NET 2.0 application. A login page, and a main page, that is a frame with a header page, and the main page. On the main page, there are two...
3
2188
by: UJ | last post by:
I had somebody (who was an idiot) tell me that tables are slow in rendering? That you shouldn't do things like tables inside of tables. Is that true? I think she didn't know what she was talking about but I just wanted to confirm with people. TIA - J.
0
7692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1045
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.