performance

How to improve performance in Oracle using SELECT DISTINCT

Hi I'm currently working in the deployment of an OFBiz based ERP The database being used is Oracle 10g Enterprise One of the biggest issues is some oracle performance problems, analyzing the ofbiz logs, the following query: SELECT DISTINCT ORDER_ID, ORDER_TYPE_ID, ORDER_NAME, EXTERNAL_ID, SALES_CHANNEL_ENUM_ID, ORDER_DATE, ENTRY_DAT...

combining multiple .js files into one in a build process

Hi, Any tips on combining multiple .js files into 1 (for a build process). Will yuicompressor do this? ...

How do polymorphic inline caches work with mutable types?

A polymorphic inline cache works by caching the actual method by the type of the object, in order to avoid the expensive lookup procedures (usually a hashtable lookup). How does one handle the type comparison if the type objects are mutable (i.e. the method might be monkey patched into something different at run time). The one idea I'v...

Efficient representation for large numeric arrays in GWT

I have a timeseries class that, over the course of a day will hold 100K-200K values (basically market ticks, uniformly sampled). On the java side the most performant representation is to use double[] (as opposed to say List). I am doubtful that this approach maps well into javasctipt. On the Java side, the double[] array must grow pe...

Is there a more performant alternative to ImageList.Images.Add?

I have a winforms ImageList which contains 200 256x256 images. When I add the images, 1 by one, half of the programs time spent on the Add method according to ANTS .NET profiler. So the program takes 10 secs to launch and 5 is spent there. That is very slow in my opinion. I implemented the same thing using ImageList.Images.AddRange. T...

Image.FromFile is very SLOW. Any alternatives, optimizations?

I have a winforms image list which contains say like 200 images 256x256. I use the method Images.FromFile to load the images and then add them to the image list. According to ANTS .NET profiler, half of the program's time is spent in Images.FromFile. Is there a better way to load an image to add to an image list? Another thing that mi...

echoing multiple arguments when output_buffering is on

One of Googles Let's make the internet faster talks included something about using echo with multiple arguments in PHP instead of using print or string concatenation. echo 'The ball is ', $color; Rather than either of these echo "The ball is $color"; echo 'The ball is ' . $color; What if output buffering is in play ? What would be...

Use file-only APIs in memory

Some APIs only support output to files. e.g. a library that converts a BMP to PNG and only has a Save(file) option - no in memory function. Disk IO is slow, though, and sometimes you just want in-memory operations. Is there a generic solution to such a problem? Maybe a fake in-memory file of sorts that would allow one to use the library...

C++ data structure with lookuptime O(1), like java's hashmap in stl ?

Is there such a structure in c++ standard library? I don't have access to anything else so unordered_map in tr1 cant be used (and boost etc). What I have is a large number of custom class elements 100000+ which I need to store, and access them very fast O(1) on everage. I can't use arrays/vectors as the elements will be stored randomly ...

Influence of tiling image size on page rendering speed

If a background image is tiled, do the dimensions of the image file have any influence on page rendering speed? I imagine that the smaller the image, the more blits have to be performed to fill the target area, so the longer the page will take to render[1]. Do you suppose this is true? I'm asking mostly from the perspective of the iPho...

limit of rows in SQL Server 2005 when performance degrades

What is the limit of rows in a table for SQL Server 2005, when SQL query starts getting slower? Is there any way to find out the limit? I understand it will depend upon the data length of a row. This will also depend on how many more data in other tables and the hardware available. ...

Is it possible to have too many anonymous delegates?

Lately, I have taken to the pattern of having a lot of diagnostic logging in parts of my code, that makes use of lambda expressions/anonymous delegates like so: MyEventManager.LogVerbose( LogCategory.SomeCategory, () => String.Format(msg_string, GetParam1(), GetParam2(), GetParam3() ); Notice that the second argument to LogVerbose is ...

wxPython RichTextCtrl much slower than tkInter Text?

I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results. In order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text Area with some wo...

why is set_intersection in STL so slow?

I'm intersecting a set of 100,000 numbers and a set of 1,000 numbers using set_intersection in STL and its taking 21s, where it takes 11ms in C#. C++ Code: int runIntersectionTestAlgo() { set<int> set1; set<int> set2; set<int> intersection; // Create 100,000 values for set1 for ( int i = 0; i < 100000; i++ ) ...

Linq to XML performance - Standalone test vs Very large web application

So I took a specific hot-spot from a very large web application, that does lot of XML processing (adding nodes, adding attributes to nodes based on some logic), then created a standalone test to mock the same situation using Linq to XML (as opposed to XmlDocument) There was 2 to 10 times performance improvement in the standalone test co...

What key performance monitors should I watch for ASP.NET application

I have a site that receives 5 million request per day. On heavy days, the pages take about 10 seconds to return. I also get out of memory exceptions. I've been reading the Improving .NET Application Performance and Scalability from Microsoft and see there are a lot of metrics I could watch. My question is: What are the most basic counte...

Why the performance difference between C# (quite a bit slower) and Win32/C?

We are looking to migrate a performance critical application to .Net and find that the c# version is 30% to 100% slower than the Win32/C depending on the processor (difference more marked on mobile T7200 processor). I have a very simple sample of code that demonstrates this. For brevity I shall just show the C version - the c# is a direc...

Why does my STL code run so slowly when I have the debugger/IDE attached?

I'm running the following code, using Visual Studio 2008 SP1, on Windows Vista Business x64, quad core machine, 8gb ram. If I build a release build, and run it from the command line, it reports 31ms. If I then start it from the IDE, using F5, it reports 23353ms. Here are the times: (all Win32 builds) DEBUG, command line: 421ms DEBUG...

Sparse dot product in SQL

Imagine I have a table which stores a series of sparse vectors. A sparse vector means that it stores only the nonzero values explicitly in the data structure. I could have a 1 million dimensional vector, but I only store the values for the dimensions which are nonzero. So the size is proportional to the number of nonzero entries, not ...

SQL join with a range of values (int ranges, date ranges, whatever)

I have two tables, the first is a big table (millions of rows), with the most interesting column being an integer I'll just call "key." I believe this solution would be identical for date or datetime ranges as well though. The second table is much smaller (thousands of rows) with a bunch of attributes that are interesting to me which a...