performance

Effect of logging on Apache's performence

Hello everyone. I am developing an Apache module. During development I found it convenient to use logging functions at various points in my code. For example after opening a file, I would log an error if the operation was not successful so that I may know exactly where the problem occurred in my code. Now, I am about to deliver my modu...

Rational Performance Tester - Table in Report has Gone Missing

Hello I have been using Rational Performance Tester 8.1.0 and trying to modify the reports to be a bit more useful. My understanding of it at the moment is that each report has the graph(s) and the table(s) and these are seperate entities that must be modified seperately. While adjusting some of the data to be shown in the tables so...

web page design issue

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 to develop ASP.Net application on IIS 7.0 + Windows Server 2008. Using SQL Server 2008 as backend. My question is, in order to achieve best web page performance form end user perspective, any principles to follow? Any good tutorials or samples to learn? thanks in advance, George ...

What collection supports multiple simultaneous insertions?

Hi, We are developing a Java application with several worker threads. These threads will have to deliver a lot of computation results to our UI thread. The order in which the results are delivered does not matter. Right now, all threads simply push their results onto a synchronized Stack - but this means that every thread must wait for...

How to store files on disc to increase performance

From performance point of view: How it's better to store uploaded files on disk? One folder and huge number of images? or create logically subfolders? OS: Linux FS: ext3 Thanks! ...

Multiple files with Log4j

Hi, I'm using log4j to log several informations. I'd like to separate these infos into multiple files. My configuration file is similar to this: #logger_1 log4j.logger.logger_1=debug, logger_1_File log4j.appender.logger_1_File=org.apache.log4j.RollingFileAppender log4j.appender.logger_1_File.l...

Fastest way to write cells to Excel with Office Interop?

I am writing a function to export data to Excel using the Office Interop in VB .NET. I am currently writing the cells directly using the Excel worksheet's Cells() method: worksheet.Cells(rowIndex, colIndex) = data(rowIndex)(colIndex) This is taking a long time for large amounts of data. Is there a faster way to write a lot of data t...

import bulk data into MySQL

So I'm trying to import some sales data into my MySQL database. The data is originally in the form of a raw CSV file, which my PHP application needs to first process, then save the processed sales data to the database. Initially I was doing individual INSERT queries, which I realized was incredibly inefficient (~6000 queries taking almo...

Simple round robin (moving average) array in C#

As a diagnostic, I want to display the number of cycles per second in my app. (Think frames-per-second in a first-person-shooter.) But I don't want to display the most recent value, or the average since launch. What I want to calculate is the mean of the last X values. My question is, I suppose, about the best way to store these values...

Which features make a laptop fast for Java development?

I remember, earlier CPU speed was the most important thing. But today I am confused. Which features determine the most if a laptop can smoothly run Eclipse with lots and lots of projects open? CPU clock speed vs number of cores? What is faster, 4 cores at 1 Ghz or 2 cores at 2,3 Ghz? Which configuration needs more power = less battery...

Performance tips for making Visual Studio 2010 faster?

I don't know if anybody else has had an issue with the performance of Visual Studio 2010, but I close it daily and reopen it, and with an hour it starts to really bog down, and can't even keep up with my typing. Is there some obvious setting I am missing that would help to speed it up? I am also using ReSharper, but even if I remove tha...

PHP: One giant database class or several smaller classes?

For the current app I am writing I have elected to place all database functionality into a single class, as it allows me to keep the database code away from the business logic and easily replace the database code if we ever have need to switch to another DBMS. However, recently my database class has become rather large (EDIT for info: a...

Efficient method of passing callback member function

I'm designing a method for an input handler class. Here is some pseudo code... void InputHandler::ScanEvents( boost::function1< void, std::string& > &func ) { // Scan keys, determining string to pass // If string found, call func with string as its argument on object tied to func } I'm not exactly sure how to implement this, o...

What's the working paradigm of Windows Performance Counter?

I have just finished reading this article about how to create a performance counter and update the counter's value. But I am a little confused about the working paradigm of the Windows Performance Counter. Suppose there're 2 programs A and B, and A want to know B's performance through some performance counters. Which of the following sce...

Not specifying control names in WPF... performance effect

If you need to access a WPF control from the code behind, you need to supply a Name attribute to it in XAML. In many cases, you don't need to access controls from the code behind, since a lot of coding logic such as binding is better applied directly inside XAML. My question is: Is there a performance gain from not supplying the name a...

PostgreSQL slow on a large table with arrays and lots of updates

I have a pretty large table (20 mln records) which has a 3 column index and an array column. The array column is updated daily (by appending new values). There is also inserts, but not as much as updates. The data in the array represents daily measurements corresponding to the three keys, something like this: [[date_id_1, my_value_for_d...

wmi performance for following queries

I'm using following two WMI queries : SELECT * FROM Win32_Group WHERE LocalAccount=true SELECT Domain,Name FROM Win32_UserAccount WHERE LocalAccount=true The 2nd query takes about 6 seconds to run (over only 4 users) whereas the 1st query takes about .3 seconds to run over 22 groups. Can somebody tell me why is there such a performan...

What is the fastest way to count all the records of a table using Doctrine ORM?

Hi, The title says it all... What is the fastest way to count all the records of a table using Doctrine ORM? I don't need the individual records of the table. I just need the total number of records in the table. Thanks! ...

C++ - STL vector question

Hello! Is there any way to make std::vector faster on reserving + resizing? I would like to achieve the performance which would be somewhat equivalent to plain C arrays. See the following code snippets: TEST(test, vector1) { for (int i = 0; i < 50; ++i) { std::vector<int> a; a.reserve(10000000); a.resize(10000000...

SDL: Performance SPriG vs SDL_gfx

Hi, I need to draw a polygon with thick lines. Now I have two possibilities: Draw them with the library SPriG, which provides line thickness. Split up the polygon in all it lines and draw them as polygons with a modified thickness (like explained in this tutorial (1 tutorial on the page).) with the SDL_gfx library. I'm not sure abou...