.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

.NET 4 Performance Issue String IndexOf

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :.NET Framework


I have a performance issue with the new dot net 4.0 framework.

When i use the function String.IndexOf(string, stringcomparison.ordinalignorecase) my execution time is much higher than framework 3.5 (i had 30ms in a loop for 3.5 and 210ms in framework 4)

All other StringComparison mode are really good in framework 4.

Is there an explanation?

View Complete Post

More Related Resource Links

Performance Issue on SQL 2008 Box

Will SSRS and SSIS running on the same machine would hinders the perfromance of a database engine. 1. If so to what extent? 2. How do you tackle this kind of issue. 3. Is there a way you can separate these services from running on the same machine. The machine also has a OLTP database running on it.

Weird Issue with the MOSS Search : FileExtension metadata object type instead of string

Hello, We 've got a strange issue with the search and especially with the FileExtension metadata. when we make a query on the search engine, we receive for the FileExtension metadata an unexcpected result. here is a printscreen showing the issue. http://cid-53eee937847a625e.photos.live.com/self.aspx/Public/Untitled.jpg as you can see the Type of the FileExtension is object and it should be string and I checked the type of the object and it's System.String[] the element at the index 0 contains the value! what's wrong ? thx in advance

XOML only workflow performance issue while creating

  In our application we are using XOML workflow and create workflow instance using workflowRuntime.CreateWorkflow(workflow, ruleReader, workflowParameters) where workflow and ruleReader are objects of XMLReader created using XmlReader.Create().For one of our business process automation we have developed XOML only workflow which has 35 states and 95 events. When we try creating an instance of the workflows it is taking more time and the time taken to create the instance is 3 min.Can any one suggest is there any other way to create workflow instance of XOML only workflows other than workflowRuntime.CreateWorkflow(workflow, ruleReader, workflowParameters)Your help is higly appreciated.Environment:    VS 2008    ASP.NET 3.5    WWF 3.5    XP  

Gridview Performance Issue

Hi All, I have one ASP.NET Application (VS.NET 2005). In that i have one scenario where i have to display 500 records per page (Not less than that bcoz this is client requirement to display 500 records per page) in the Gridview. This functionality is working fine but the application is becoming very slow. Can anybody tell me the solution for increasing performance in this case ???? VERY URGENT...PLZ REPLY SOON Thanks, Biswajit

performance issue


i am having an issue in queying a table. This is something thats happening since the last 2 days. whenever i try to open a table (rightclick --> open table ) it errors  out saying the query time out period elapsed before the completion of the operation or server is not responding. But when i query select * from tablename..it is taking some time but is returning the results. The query time out period is set to 0(indefinite time out). we have never seen this kind of issue before. There are no open transactions either to assume that something is locking the system(dbcc opentran returns there are no open trans). Wondering why this is happening and also the performance of the system has gone down completely. Please help us in this issue. I checked the indexes for fragmentation and could see in some of them avg_fragementaton_percent like 60, 70, 80. i guess it is not good to have high such a value, so i ran dbcc reindex but still did not improve the performance. the avg_fragmentation was still the same.

Please advice. 

Issue with WCF performance


We have several WCF (3.5 hosted in IIS7) web services that are having some strange and inconsistent performance issues. In some environments they run fairly quickly. In others they time-out even if we significantly increase the timeout. We have tried all of the advice for performance tuning an IIS 7 hosted WCF service to no avail.

The svc log however shows some odd beheavior I am not sure how to interpret. I will get a message saying Opened System.ServiceModel.InstanceContext/..... The next message will say "A message was read". all good except it takes over six minutes sometimes. I do not follow these logs well enough to understand what could be causing this.

If anybody could provide any help or guidance, it would be greatly appreciated.

Best regards,


 Additional information: Just realized that the servers where we are having the large delays reading the message have Symantec "Data Endpoint Security" installed. Seems like it could be related. anybody have familiarity with this AV client and WCF?

Performance Issue.



I have a query which involves a table and a function. Table has got around 59 crores of records and the function returns 56k records. There is a inner join between with function being on the left side. This query takes around 2 minutes to execute. I wanna improve the performance to few seconds.

I made sure that the table has all required indexes but still was not able to improve the performance.

Please suggest what else i can do to improve performance.







unterminated string literal issue in asp.net onclick


<img width="15" height="15" border="0" onclick="_s.my.letters.action.fillDataForMenu(this, {id:'26308409', title: 'hi''})" src="http://media.newjobs.com/mm/redux/cover-letter/flyoutPoint.png" alt="action">

this is code generated for the image button for my which looks like

<img height="15" border="0" width="15" alt="action" src="http://media.newjobs.com/mm/redux/cover-letter/flyoutPoint.png" onclick="_s.my.letters.action.fillDataForMenu(this, {id:'<%# ((SimpleLetter)Container.DataItem).ID %>', title: '<%# ((SimpleLetter)Container.DataItem).EncodedTitle %>'})"/>

but this code is giving the Error as "unterminated string literal" in javascript if i include the single quote in the Title Text.....(')

remaining cases its working good

Sql Server compact Edition Performance issue

I was  trying to insert a .wav file to sql server CE..The file is of size 1 Mb,but it takes a long time to perform the action (more than 1 min).Anybody have solution ? please help me..

Performance Issue


we did a performance check on production and found that an object is missing from the Layout page which causes the below error frequently.

 When we check the log file we get the below error

1. SearchUpgradeGetKeywordPropertyBag keywordsPropertyBag is null

2. Cannot open file "Resources.en-US.resx" for reading.
(#3: Cannot open file "Resources.resx" for reading.)


Most of the time SearchUpgrade and Cannot open file error are followed by While Initializing navigation error.

And we receive a deadlock error in the IIS(ISAPI.dll) at the same time when we receive this error.

Query String Issue


Hello everyone,

I just started with learning MVC so please bear with me. I have a grid displayed on my Main page(Index) and when I click on the Details Link for a particular row(suppose productID=1) it should invoke the following action otherwise redirectToAction("Index"):


        // GET: /Home/Details
        public ActionResult Details(int? ProductID)
            if (!ProductID.HasValue)
                return RedirectToAction("Index");
                return View("Details");

The ProductID in my case is always Null and it actually ends up redirecting back to the main page as expected. Why is that happening. Somebody please help.

Thank You

vs 2010 performance issue


we have migrated our application from vs 2005 to 2010 we found that page loading time is increased 

any idea why this is happing or how to improve it 

Connection String issue?


Hey guys.

I'm working on an MVC2 app and my solution consists of a MVC2 Project, and Class Library Project that holds my EDMX.

My MVC2 project references the class library project and for some reason when I compile I get this error.

I'm suspecting that it's got to do with the lack of a ConnectionString in the MVC2 Project, but shouldn't that have come across into the Web.Config when I added reference to the Class Library (I noticed this happen once before?), plus I figured that the MVC2 project wouldn't need the Connection String because the Class Library is handling all the connections?

Any help would be appreciated!

System.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

Line 79:         MyBase.New("name=NameEntities", "NameEntities")

Performance issue with GridView


Hi All,

             i am facing performance issue while using the datagrid in my project, i am writing my code here please correct me if i am writing something wrong.

i am using sql server 2000 in which i have a table containing around 600000 records and i can not put any indexing on this table as this is the staging table for me .

now To show these record on front end i am using gridview with Allowpaging = "True" now in the PageIndexChanged event i have to again hit the database and bind the grid which results very slows performance as just to change the page i have to read 600000 records again and again, i am giving some idea below what i am doing

Public Void BindgridView()


//do database connection

//fill the dataset through adapter

Gridview.datasource = dataset();



protected void GridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
      GridView1.PageIndex = e.NewPageIndex;

Any idea how can i imrove the performance, Please help me out..



Updating multiple Indexes on a table - Performance issue



I have a performance issue when trying to update a table with multiple indexes. The table itself has about 280 million rows. The selection of the records is fast, about 160 ms, as it has a suitable non-clustered index. However the update itself takes over 10 minutes.

When I look at the excution plan, it shows the update to the clustered index as well 5 other non clustered index which are being affected by the statement. Unfortunately it doesn't show me how those indexes are being accessed. I suspect that the update statement is performing a full index scan against each of the non-clustered indexes in order to do the update.

So my question is this, if i add the key columns of the other non-clustered indexes as included columns on the index used to select the records for update will sqlserver use them to access the additional non-clustered indexes?

any advice greatly appreciated


Performance issue with select query



I have simple select query as below

SELECT DISTINCT BCEGPrsLinesCd, BCEGCmlLinesCd,CountyFedInfoPrcStdNbr

FROM TPSeleBCEGAddress WITH(nolock)




AND LTRIM(RTRIM(PrefixStreetDirCd))='E'






AND LTRIM(RTRIM(BCEGEffectiveYr))='1998'

Table TPSeleBCEGAddress has 64 Lakhs records in it and it takes around 22 Seconds to execute this query. Please let me know a way to improve performance of this select query.

Primary key defined on this table comprises of 16 columns.






Sharepoint Search Performance issue


Hi i am using Sharepoint 2007  Search and we are currently doing a performance test on the search. The issues is that once we add more concurrent users (more than 10) though the search results are displayed to the user  the CPU usage goes beyond the threshold value . Can any one tell me if there might be some thing which might be causing this. Some one else suggested that there migh be some services running on the server which are not actually required. But didnt mention which once specifically.  

Details of the share Point server :


·         OS                          :  Microsoft Windows server 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend