performance

Tips of coding java programs in multicore scenario

There seems to be a lot of fuss about multicore and java. While some people say that java support is not good enough, it definitely seems to be an area to look forward to. There seems to be many techniques to improve performance of concurrent programs. Any tips/advices about programming in a multi core scenario is appreciated. ...

mysql tables structure - one very large table or separate tables?

I'm working on a project which is similar in nature to website visitor analysis. It will be used by 100s of websites with average of 10,000s to 100,000s page views a day each so the data amount will be very large. Should I use a single table with websiteid or a separate table for each website? Making changes to a live service with 100...

What is the performance cost of assigning a single string value using +'s

I have often wondered this, is there a performance cost of splitting a string over multiple lines to increase readability when initially assigning a value to a string. I know that strings are immutable and therefore a new string needs to be created every time. Also, the performance cost is actually irrelevant thanks to today's really fas...

How can I select entries for a given weekday using SQL?

I could use this query to select all orders with a date on a monday: SELECT * from orders WHERE strftime("%w", date)="1"; But as far as I know, this can't be speed up using an index, as for every row strftime has to be calculated. I could add an additional field with the weekday stored, but I want to avoid it. Is there a solution tha...

What are some faster alternatives to Java2d?

I'm looking to do some physics simulations and I need fast rendering in Java. I've run into performance issues with Java2d in the past, so what are the fast alternatives? Is JOGL significantly faster than Java2d? ...

SQL Server Maintenance Suggestions?

I run an online photography community and it seems that the site draws to a crawl on database access, sometimes hitting timeouts. I consider myself to be fairly compentent writing SQL queries and designing tables, but am by no means a DBA... hence the problem. Some background: My site and SQL server are running on a remote host. I u...

Fast page retrieval in MySQL, index usage?

I would like to speed a MySQL query that basically retrieve a page of data following the pattern below select my_field_A, my_field_B where time_id >= UNIX_TIMESTAMP('1901-01-01 00:00:00') AND time_id < UNIX_TIMESTAMP('2009-01-16 00:00:00') The field time_id is an MySQL index, yet, the query behaves as if the entire database was ...

Software Bandwidth/Database Growth Formulas

Are there any industry standard formulas or rules of thumb for determining: Application bandwidth usage/requirements Database growth requirements I have recently started managing a new .NET 3.5/SQL Server project and would like to take a more structured approach than previously when determining exactly what my application needs in te...

Switch from Microsofts STL to STLport

Hi! I'm using quite much STL in performance critical C++ code under windows. One possible "cheap" way to get some extra performance would be to change to a faster STL library. According to this post STLport is faster and uses less memory, however it's a few years old. Has anyone made this change recently and what were your results? ...

Can we speed up sandcastle?

We make use of sandcastle (and SHFB) to generate class library documentation from inline XML comments. It's a great tool to maintain complete and professional looking reference + overview documentation, including correct code samples. Unfortunately, it's also dog slow. It's by far the most time consuming step of our automated build, and...

Boolean[] vs. BitSet: Which is more efficient?

What is more efficient in terms of memory and CPU usage — an array of booleans or a BitSet? Specific BitSet methods are not used, only get/set/clear (==, =, Arrays.fill respectively for an array). ...

fseek / rewind in a loop

I have a situation in a code where there is a huge function that parses records line-by-line, validates and writes to another file. In case there are errors in the file, it calls another function that rejects the record and writes the reject reason. Due to a memory leak in the program, it crashes with SIGSEGV. One solution to kind of ...

How to get object size in memory ?

I need to know how much bytes my object consumes in memory (in C#). for example how much my hashtable, or SortedList, or List. ...

Database Network Latency

Hi All, I am currently working on an n-tier system and battling some database performance issues. One area we have been investigating is the latency between the database server and the application server. In our test environment the average ping times between the two boxes is in the region of 0.2ms however on the clients site its more ...

optimize web service client side performance?

Hello everyone, I am using the automatically generated proxy for a ASP.Net asmx web service. I find when send HttpWebRequest to my web server, it is the throughput from client side is very good (very big number). But when using the automatically generater proxy, it is very slow. I want to know some general ways to optimize the performan...

Odd SQL 2000 query performance problem

Hi, In some SQL query performance tuning, I noticed that the following query was running slowly but it wasn't thrashing the CPU and there appeared to be no other system bottlenecks to cause it to run slowly. In fact the CPU average was 15% whilst it ran: UPDATE: The query in question runs in a cursor loop which contains 800 records: c...

Does Wirth's law still hold true?

Adage made by Niklaus Wirth in 1995: «Software is getting slower more rapidly than hardware becomes faster» Do you think it's actually true? How should you measure "speed" of software? By CPU cycles or rather by time you need to complete some task? What about software that is actually getting faster and leaner (measured by CPU cycle...

Garbage Collection in Biztalk, What would be the wise approach?

Our Biztalk 2006 application contains two orchestrations which are invoked on frequent basis (approx 15 requests per second). We identified possible memory leakages in our application by doing certain throttling threshold changes in the host. As we disabled the memory based throttling, the Process memory started increasing till 1400 MB a...

PowerShell: Performance of .NET methods calls

Is it possible to call a .NET method from PowerShell with early binding? I have a pipeline script which calls a single .NET method in process {...}. PowerShell calls this method via reflection, and right now Invoke (not the method itself, just reflection call) takes 70% of total execution time. The method is always the same, so I would...

List<T> Casting algorithms and performance considerations.

I have the following code class Program { static void Main(string[] args) { List<A> aList = new List<A>(); var aObj = new A(); aObj.Go(aList.Cast<IB>()); } } class A : IB { public void Go(IEnumerable<IB> interfaceList) { foreach (I...