Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Terrible slowdown on .NET processing
Message
De
05/05/2006 02:25:01
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Terrible slowdown on .NET processing
Divers
Thread ID:
01119485
Message ID:
01119485
Vues:
49
I just found something that I just can't find the reason. I have a terrible slowdown in one of my .NET application.

If I have this:
                        If cCurrentField = "No_Claim" Then
                            lcHtml = lcHtml + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>"
                        End If
as part of a loop which is executed 200 times, it will take one second to execute the loop 200 times.

But, if I have this:
                        If cCurrentField = "No_Claim" Then
                            lcHtml = lcHtml + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>" + "&ClaimNo=" + Trim(oRow("No_Claim")) + "&MitTelAI=" + _
                             LTrim(Str(oRow("AI"))) + "&Hd=1>"
                        End If
as part of a loop which is executed 200 times, it will take 7 seconds to execute the loop 200 times.

What is going on? Why is it that simply adding a longer string causes the process to crawl?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform