I've a performance related question regarding use of StringBuilder.
In a very long loop I'm manipulating a StringBuilder and passing it to another method like this:
for (loop condition) {
StringBuilder sb = new StringBuilder();
sb.append("some string");
. . .
sb.append(anotherString);
. . .
passToMethod(sb.toStri...
A classic ASP.NET app - AppSrv + MS SQL DB. Both servers are heavy-lifters 8 cores, 20 GB of RAM. When load testing, the throughput goes somewhere to 400 VirtualUsers (according to LoadRunner) with CPU being approximately 30% utilized an DB server primarily idling - response times go dramatically up, to the point of unresponsive.
The us...
Which SQL statement is faster?
SELECT TOP 2 c1.Price, c2.Price, ..... c49.Price, c50.Price
FROM Table1 AS c1, Table2 AS c2, ..... Table49 AS c49, Table50 AS c50
WHERE c1.Date = c2.Date AND c2.Date = c3.Date ..... c49.Date = c50.Date
ORDER BY c1.ID DESC
OR
SELECT TOP 2 c1.Price, c2.Price, ..... c49.Price, c50.Price
FROM (Table1 AS c1...
We're looking at using Oracle Hierarchical queries to model potentially very large tree structures (potentially infinitely wide, and depth of 30+). My understanding is that hierarchal queries provide a method to write recursively joining SQL but they it does not provide any real performance enhancements over if you were to manually write...
Does the placement of a function have an effect on the performance of closures within scope? If so, where is the optimal place to put these functions? If not, is the implied association by closure enough reason to place a function in another place logically?
For instance, if foo does not rely on the value of localState, does the fact ...
What are some things I can do to improve query performance of an oracle query without creating indexes?
Here is the query I'm trying to run faster:
SELECT c.ClaimNumber, a.ItemDate, c.DTN, b.FilePath
FROM items a,
itempages b,
keygroupdata c
WHERE a.ItemType IN (112,115,189,241)
AND a.ItemNum = b.ItemNum
AND b.ItemNum = c.ItemNum
ORDER...
In the recent project, we had an issue with the performance of few queries that relied heavily on ordering the results by datetime field (MSSQL 2008 database).
When we executed the queries with ORDER BY RecordDate DESC (or ASC) the queries executed 10x slower than without that. Ordering by any other field didn't produce such slow result...
Hi,
Is there some library for using some sort of cursor over a file? I have to read big files, but can't afford to read them all at once into memory. I'm aware of java.nio, but I want to use a higher level API.
A little backgrond: I have a tool written in GWT that analyzes submitted xml documents and then pretty prints the xml, among o...
I have a table with three columns:
user varchar, status varchar , rep int
status and rep get updated often and one of the requirements is:
Given a datetime value view status and rep values, for each user, at the given date.
I can add an updated_at datetime column to the table and insert new rows whith the same user instead of update ...
Hi,
I want the most performat way to read and parse a file.
Is it possible to read a file in .NET, but not load the entire file into memory? i.e. just load the file line by line as I parse the content of each row?
Does XmlTextReader load the entire file into memory or does it stream the file into memory as it reads the file?
...
Lately I've been in the habit of assigning integer values to constants and simply using the constant name as a means of identifying its purpose. However, in some cases this has resulted in the need to write a function like typeToString($const) when a string representation is needed. Obviously this is inefficient and unneccesary, but is o...
Excuse me if I'm off on my terminology, I only have around 2.4 years of programming experience, mostly in .NET.
Currently I'm one of two .NET developers in a mainframe shop, the other developer set the standards and is a great coder with a lot more experience plus a CS degree(I am 100% self taught).
We use custom collections for every...
Already implemented performance boosters :
- Get compatible image of GraphicsConfiguration to draw on
- Enable OpenGL pipeline in 1.5: Not possible due to severe artifacts
So far I am fine, the main profiled bottleneck of the program is drawing an image with several thousand tiles. Unfortunately it is not regular, else I simply could se...
C++: Since a struct is a class with everything "public", are default -ctors created and called?
The reason I ask is to understand the overhead, if any, that C++ may have over C, when structs are used. An opinion I have heard is that classes have some overhead that structs don't, in C++, but I question this.
...
I have a class that downloads, examines and saves some large XML files. Sometimes I want the UI to tell me what's going on, but sometimes I will use the class and ignore the events. So I have placed lines of code like this in a dozen places:
RaiseEvent Report("Sending request: " & queryString)
RaiseEvent Report("Saving file: " & fileNa...
Howdy,
I have a long running insert transaction that inserts data into several related tables.
When this insert is running, I cannot perform a select * from MainTable. The select just spins its wheels until the insert is done.
I will be performing several of these inserts at the same/overlapping time. To check that the informa...
I've been trying to compare the memory footprint between a VB6 application and .Net application. Trying to determine what's the average difference between the two.
The .Net code is for the most part a direct translation of the VB6 and for the most part has the same instructions as they would be programmed in C#. So while it's an apple t...
What are the ways by which we can reduce the size of the HTML Response sent by an asp.net application?
I am using Controls which are not owned by me and it produces output with white spaces. I am interested in Minifying the entire HTML output of the page just like how google does (View source www.google.com) to improve the timing.
Is t...
Which perfoms better: Crystal Reports or SQL Server Reporting Services?
...
How can I count operations in C++? I'd like to analyze code in a better way than just timing it since the time is often rounded to 0 millisec.
...