performance

Dynamic Windows Forms Components (Performance problem)

I have a problem with performance of my code under Windows Forms. Have a form, her layout is depending on constructor data, because he layout must be OnLoad or in Constructor generated. I generation is simple, base FlowLayoutPanel have other FlowLayoutPanels, for each have a Label and TextBox with DataBinding. Problem is this is VERY S...

Suggested (simple) approach for drawing large numbers of visual elements in WPF?

I'm writing an interface that features a large (~50000px width) "canvas"-type area that is used to display a lot of data in a fairly novel way. This involves lots of lines, rectangles, and text. The user can scroll around to explore the entire canvas. At the moment I'm just using a standard Canvas panel with various Shapes placed on it....

c++ profiler that can attach to a running process?

I have a program written in c++ that I want to profile, and I want to avoid restarting it when I start and stop profiling. Ideally I would be profiling both CPU usage and memory allocation. Is there any tool that will allow me to do this? I'm running on Linux. ...

Comparison of databases on the performance of Ruby on Rails

It is well-known that Ruby on Rails offers a list of choice on database adapters, like MySQL, PostgreSQL, Sqlite, MSSQL, Oracle, DB2. All of them offers the same basic set of SQL on CRUD. Is there any comparison on their performance when running a typical Ruby on Rails application? ...

Is count(*) really expensive ?

I have a page where I have 4 tabs displaying 4 different reports based off different tables. I obtain the row count of each table using a select count(*) from <table> query and display number of rows available in each table on the tabs. As a result, each page postback causes 5 count(*) queries to be executed (4 to get counts and 1 for ...

Efficiently remove points with same slope

Hi, In one of mine applications I am dealing with graphics objects. I am using open source GPC library to clip/merge two shapes. To improve accuracy I am sampling (adding multiple points between two edges) existing shapes. But before displaying back the merged shape I need to remove all the points between two edges. But I am not ab...

Will PHP Die In Web Page Development World?

I know that PHP is still the most popular web programming language in the world. This question just want to bring some of my concerns about PHP. PHP is naturally bound to C10K problem. Since PHP (generally run in Apache) cannot be event-driven or asynchronous, each HTTP request will occupy at least one thread or process. This makes it r...

percentage of memory used used by a process

percentage of memory used used by a process. normally prstat -J will give the memory of process image and RSS(resident set size) etc. how do i knowlist of processes with percentage of memory is used by a each process. i am working on solaris unix. addintionally ,what are the regular commands that you use for monitoring processes,perfo...

How I should use BIT in SQL Server 2005

Regarding to SQL performance. I have a scalar valued function for checking some specific condition in base, it returns BIT value for True or False. I now do not know how I should fill @BIT parameter If I write. set @bit = convert(bit,1) or set @bit = 1 or set @bit='true' function will work anyway but I do not know which met...

Performance of a get unique elements/group by operation on an IEnumerable<T>.

I was wondering how could I improve the performance of the following code: public class MyObject { public int Year { get; set; } } //In my case I have 30000 IEnumerable<MyObject> data = MethodThatReturnsManyMyObjects(); var groupedByYear = data.GroupBy(x => x.Year); //Here is the where it takes around 5 seconds foreach (var gro...

How to find Expr#### in Execution Plan

When looking at the actual execution plan for a query in SQL Server Management Studio (SSMS), how do I determine what an expression such as Expr1052 represents? When I identify the costly parts of the query and look at the properties of that operation, there are often references only to these Expressions, or scalar operators. I want to...

Maven + Tomcat acceleration

I am writing a web application with Maven in the Eclipse IDE, and use Tomcat servlet container. So, I run Maven like this: mvn clean compile. It is reasonable that after this operation I must re-run Tomcat so it can reinitialize the context (Sysdeo Tomcat launcher helps a lot). The problem is Maven execution and subsequent Tomcat re-ru...

List of objects or parallel arrays of properties?

The question is, basically: what would be more preferable, both performance-wise and design-wise - to have a list of objects of a Python class or to have several lists of numerical properties? I am writing some sort of a scientific simulation which involves a rather large system of interacting particles. For simplicity, let's say we hav...

Sql query: use where in or foreach?

Hi, I'm using query, where the piece is: ...where code in ('va1','var2'...') I have about 50k of this codes. It was working when I has 30k codes, but know I get: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that...

has anyone used simile timeline with large amounts of data

i am using this simile timeline with large amounts of data and i keep getting firefox popping up saying "a script has appeared to no longer be running, do you want to kill it"? is there a limit to the amount of json you can send back to it. I have about 1000 different timeline points with dates, descriptions, etc. ...

Output of HPCToolkit

I am using a tool named HPCToolkit to measure the performance of all loops in the program. It looks like it only shows whats causing the performance bottlenecks and not the profiling information for the entire source. Is my understanding correct? ...

INNER JOIN vs LEFT JOIN performance in SQL Server

I've created SQL command that use INNER JOIN for 9 tables, anyway this command take a very long time (more than five minutes). So my folk suggest me to change INNER JOIN to LEFT JOIN because the performance of LEFT JOIN is better, at first time its despite what I know. After I changed, the speed of query is significantly improve. I want...

How to interpret mono profiler results?

I created a console application in C# and running it on windows/.NET is 5x faster than on linux/mono or windows/mono. The app encodes some binary files into text format(JSON). I profiled the app on linux/mono using: mono --profile=default:stat myconsoleapp.exe Here is the first part of the result: prof counts: total/unmanaged: 32274...

Performance issues with repeatable loops as control part

Hey guys, In my application, i need to show made calls to the user. The user can arrange some filters, according to what they want to see. The problem is that i find it quite hard to filter the calls without losing performance. This is what i am using now : private void ProcessFilterChoice() { _filteredCalls = ServiceConne...

Switch statements: do you need the last break? (Javascript mainly)

When using a switch() statement, you add break; in between separate case: declarations. But what about the last one? Normally I just leave it off, but I'm wondering if this has some performance implication I'm not thinking about? I've been wondering about this for a while and don't see it asked elsewhere on Stack-O, but sorry if I m...