performance

Measuring Session Variable Size / Weight - Plus - Is there Session Compression?

Hello - I have a question about session variables. We use serializable value objects to store values. Sometimes we're using composite / aggregate objects and I'd like to know how much memory these objects are occupying. What's a good way to see how big these objects are, so I can see what kind of memory they are using on the server. ...

Python MySQL Performance: Runs fast in mysql command line, but slow with cursor.execute

I'm writing a script for exporting some data. Some details about the environment: The project is Django based I'm using raw/custom SQL for the export The database engine is MySQL. The database and code are on the same box.- Details about the SQL: A bunch of inner joins A bunch of columns selected, some with a basic multiplication ...

gcc -O3 question, calling same function from different file yields different performance

Hey, I'm running the following benchmark: int main(int argc, char **argv) { char *d = malloc(sizeof(char) * 13); TIME_THIS(func_a(999, d), 99999999); TIME_THIS(func_b(999, d), 99999999); return 0; } with normal compilation, the results are the same for both functions % gcc func_overhead.c func_overhead_plus.c -o func_overhead...

Java file i/o throughput decline

I have a program in which each thread reads in files many lines at a time from a file, processes the lines, and writes the lines out to a different file. Four threads split the list of files to process among them. I'm having strange performance issues across two cases: Four files with 50,000 lines each Throughput starts at 700 lines...

const string vs static string in c#

Hello, Is using static string better than const string in C# static string _mystr; vs const string Mystr; ...

WPF PathGeometry update is _SLOW_

In a WPF UI I have nodes connected by bezier paths, like so: When the user drags a node around, the connecting paths need to be updated in real-time. However, I've noticed some slowdown (especially if one node is connected to many others, or multiple nodes are being dragged at once). I profiled it, and the main problem appears to be h...

Optimize SELECT from Partitioned Fact Table in Oracle 10

I have a fact table containing 8 Million rows with 1 Million rows increase per month. The table already contains indexes on it. The table is used by IBM Cognos environment to generate reports. Currently I am looking for way to optimize the table SELECT statements. As first try, I partitioned the table (each partition has equal distribu...

I/O methods in C

Hi, I am looking for various ways of reading/writing data from stdin/stdout. Currently I know about scanf/printf, getchar/putchar and gets/puts. Are there any other ways of doing this? Also I am interesting in knowing that which one is most efficient in terms of Memory and Space. Thanks in Advance ...

PerfMon web interface - does it exist?

I realise that it is fairly easy to query performance counters in code and display these on an ASPX page but does anyone know if a product already exists which is basically a web version of PerfMon - free or otherwise? many thanks Marcus ...

Ruby Struct - Performance Overhead?

Is there any performance overhead that you take on when using Structs (as compared to Arrays, Hashes, etc.) in Ruby? ...

How expensive is creating of a new thread in Java? When should we consider using of a thread pool?

I wonder where is the verge after which a thread pool should be used. How many new threads per second can I create without using a thread pool still avoiding noticeable performance penalty? Are there any observable open-source thread-pool implementations? ...

Why is lookup in stl::map slower than in stl::vector in my Application?

I am kind of startled, especially after reading this. I use template <class T> int GetPosition(vector<T> mVec, T element) { return find(mVec.begin(), mVec.end(), element) - mVec.begin(); } and template <class T> int GetPosition(map<T, int> mMap, T element) { return mMap.find(element)->second; } as template functions to ge...

Android - how to improve HorizontalScrollView that has lots of views/images inside

Hi I have a HorizontalScrollView that has lots of views and images inside it. The issue is that if I have lots of stuff inside it I will get a 'java.lang.OutOfMemoryError: bitmap size exceeds VM budget' is there any way to use some kind of cache, or add/remove stuff as I move left/right so its not on memory all the time? Thanks ...

How to optimally translate enums in the smallest amount of code?

It's often the case that you have 2 enums that are equivalent but numbered differently, and you need functions to translate elements from the first enum to elements of the second and the reverse. This is usually really tedious to code, and anytime a new element is added you have to make sure to add the pairing both to the converting and ...

Fastest C++ map?

Correct me I'm wrong but std::map is an ordered map, thus each time I insert a value the map uses an algorithm to sort its items internally, which takes some time. My application gets information regarding some items on a constant interval. This app keeps a map which is defined like this: ::std::map<DWORD, myItem*> At first all item...

PCap performance

Which c-sharp wrapper of Pcap is fastest? How fast is PCap compared to using sockets? ...

How can I learn to make realistic assumptions about database performance?

I'm primarily a Java developer who works with Hibernate, and in some of my use cases I have queries which perform very slowly compared to what I expect. I've talked to the local DBAs and in many cases they claim the performance can't be improved because of the nature of the query. However, I'm somewhat hesitant to take them at their ...

FP-intensive hyperthreading performance on latest Xeons

We have recently purchased a dual Intel X5650 workstation to run a floating-point intensive simulation, under Ubuntu 10.04. Each X5650 has 6 cores, so there are 12 cores in total. The code is trivially parallel, so I have been running it mostly with 12 threads, and observing approximately "1200%" processor utilization through "top". Hy...

Import profile data into generic analysis and visualization tool

I have a mechanism for generating profile data of a couple of different types. Are there any tools that will import profile data from external sources and produce useful interactive visualizations? It seems like there are many profiling tools out there that all implement their own rendering engines, but there really isn't much difference...

oracle 10 performance issue with Select * from ...

sql : select * from user_info where userid='1100907' and status='1' userid is indexed, the table has less than 10000 rows and has a LOB column. The sql takes 1 second (I got this by using "set timing on" in sqlplus). I tried to use all columns names to replace *,but still 1 second. After I removed the LOB column ,the sql takes 0.99 s...