performance

How do you measure the performance of your Silverlight applications?

What are some tools/practices used to measure performance with Silverlight? I am interested in the performance costs of rendering certain xaml objects as well as algorithms I have written. I was about to start writing my own classes for this, but I thought I would ask here first. Thank you in advance. ...

Does the order of conditions in there where clause affect the speed of the query?

Does the order of conditions in there where clause affect the speed of the query? For instance, could: select fname, lname from people where isValid = 1 and lname like '%test%' be faster than select fname, lname from people where lname like '%test%' and isValid = 1 Duplicate: Does the order of columns in a WHERE clause matter...

What is faster: SqlCommand.Parameters[string] or .Parameters[int] ?

Which way is preferred? SqlCommand = new SqlCommand(query); command.Parameters.Add("@Foo"); command.Parameters[0].Value = Foo; command.Parameters.Add("@Bar"); command.Parameters[1].Value = Bar; // or command.Parameters.Add("@Foo"); command.Parameters.Add("@Bar"); command.Parameters["@Foo"].Value = Foo; command.Parameters["@Bar"].Valu...

Runtime query analysis and optimization

Hi everyone, I'm wondering if there's some sort of runtime mechanism that would observe the queries that are running against my database server; record how many queries of each "type" are running; look at the performance of these queries; then, based on this runtime data, suggest what indexes need to be added/removed. I'm working aga...

Java Robot createScreenCapture performance

I need to grab a series of screenshots and concatenate them into a movie. I'm trying to use the java Robot class to capture the screen. But the createScreenCapture() method takes more than 1 second on my machine. I can't even get 1 fps. Is there a way to speed it up? Or is there any other API? Edit: It is allocating a buffered image. ...

JavaScript: merging files without problems?

I have three javascript files that I want to merge into a single file. Is it possible to just copy paste all of the code into one file or will there be namespace conflicts and other problems? EDIT: I'm worried that each file acts like a namespace encapsulating each file's code, and that this encapsulating will cease to existing if I mer...

newInstance() vs new

Is there a penalty for calling newInstance() or is it the same mechanism underneath? How much overhead if any does newInstance() have over the new keyword* ? *: Discounting the fact that newInstance() implies using reflection. ...

performance tuning ask for advice

Hello everyone, I found when I turn off (un-select) automatically detect proxies setting in Internet Options, my application (which involves a lot of Http based network communication) performance will boost a lot. Now I want to prove that performance issue is actually caused by automatically proxy detection. Any ideas from debugger o...

BizTalk port/orchestration filtering performance overhead

Please consider the following scenario in BizTalk 2006: Received message should be routed to orchestration or send port according to the following constraints (Message.Type = "SomeType" AND Message.Sender = "SomeSender") OR (Message.Type = "SomeOtherType" AND Message.Sender = "SomeOtherSender" AND Message.IsSigned = true) OR (Message.S...

How to perform fast formatted input from a stream in C++?

The situation is: there is a file with 14 294 508 unsigned integers and 13 994 397 floating-point numbers (need to read doubles). Total file size is ~250 MB. Using std::istream takes ~30sec. Reading the data from file to memory (just copying bytes, without formatted input) is much faster. Is there any way to improve reading speed withou...

How to resolve Sybase table locks (VB6)?

I am not a great VB programmer, but I am tasked with maintaining/enhancing a VB6 desktop application that uses Sybase ASE as a back-end. This app has about 500 users. Recently, I added functionality to this application which performs an additional insert/update to a single row in the database, key field being transaction number and the...

Is performance a sufficient reason for having a singleton or static class?

I have class that I believe should not be a singleton or static class. It has state, albeit state that could be shared by consumers. I like to stay away from singletons when there is shared state, but the argument I'm hearing is that I will reap performance benefits from only ever having 1 instance of the object exist at any given time...

Does soCaseInsensitive greatly impact performance for a TdxMemIndex on a TdxMemDataset?

I am adding some indexes to my DevExpress TdxMemDataset to improve performance. The TdxMemIndex has SortOptions which include the option for soCaseInsensitive. My data is usually a GUID string, so it is not case sensitive. I am wondering if I am better off just forcing all the data to the same case or if the soCaseInsensitive flag and...

Are datasets scalable? Would a site like myspace use them for data retrieval?

Hi, How scalable are datasets? Team member wants to use datasets for data retrieval and manipulation, use the built in data integrity etc. to use the object to perform data updates etc. Our system is expected to scale to millions of users. Everything that I have read is against dataset's in an enterprise environment, am I wrong here ...

Can Hibernate be used in performance sensitive applications?

I'm seeing performance problems with retrieving multiple instances of objects that have many relationships with other objects. I'm using Spring and Hibernate's JPA implementation with MySQL. The issue is that when executing a JPA query, Hibernate does not automatically join to other tables. This results in n*r + 1 SQL queries, where n is...

Select random sampling from sqlserver quickly

I have a huge table of > 10 million rows. I need to efficiently grab a random sampling of 5000 from it. I have some constriants that reduces the total rows I am looking for to like 9 millon. I tried using order by NEWID(), but that query will take too long as it has to do a table scan of all rows. Is there a faster way to do this? ...

Performance with sequentially increasing primary key

Looking for guidance on selecting a database provider for a specific key pattern. The only key field will be a pre-allocated unique sequentially-increasing number. During each day between 50 and 100 thousand items will be added, processed (updated), and then retained for a week or so, after which usually the lowest-numbered records wi...

Enclosing calls to debug() in if isDebugEnabled(): a good policy?

Our team has the policy of doing logging like if (LOGGER.isDebugEnabled()) { LOGGER.debug("model[" + model + "]"); } instead of simply calling the logging method like this: LOGGER.debug("model[" + model + "]"); This practice is capable of leading to some performance improvement, but on the other hand it makes the codebase more ...

Increasing performance with setting indices on fields used in a group by clause?

I create a view with many joins. I want to group the resultset by some of the fields I selected. Does setting indices on these fields increases the performance of the query? I'm using MS SQL Server, but it should be nearly the same for all dbs, shouldn't it? SELECT table1.field1, table1.field2, table2.field1 FROM table1 INNER JOIN tabl...

My JBoss server hits 100% SYS CPU on Linux; what can cause this?

We've been debugging this JBoss server problem for quite a while. After about 10 hours of work, the server goes into 100% CPU panic attacks and just stalls. During this time you cannot run any new programs, so you can't even kill -quit to get a stack trace. These high 100% SYS CPU loads last 10-20 seconds and repeat every few minutes. W...