My profiler trace shows that exec sp_reset_connection is being called between every sql batch or procedure call. There are reasons for it, but can I prevent it from being called, if I'm confident that it's unnecessary, to improve performance?
UPDATE:
The reason I imagine this could improve performance is twofold:
SQL Server doesn't n...
Hi all,
I have a PHP routine that I call shell_exec to traverse my own website and build an index.
However since I do this multi-threaded I have been running into problems with memory storage...server memory spikes to 250MB then back down to 100MB randomly.
I am constantly accessing the mysql database during this time; and the php sl...
Possible Duplicate:
Using an ORM or plain SQL?
Would you elect to use an ORM or some kind of home spun DAL? And why?
The advantages of an ORM seem obvious - better structure / organization, better language fit etc. But I worry about performance issues. Anyone have war stories to share? Any insights on not so obvious risks or ...
Consider something like...
for (int i = 0; i < test.size(); ++i) {
test[i].foo();
test[i].bar();
}
Now consider..
for (int i = 0; i < test.size(); ++i) {
test[i].foo();
}
for (int i = 0; i < test.size(); ++i) {
test[i].bar();
}
Is there a large difference in time spent between these two? I.e. what is...
In our project, swf assets are provided by cp(content provider). To guarantee these assets are not overproof, we need an application to check them.
This application is run on different devices. So, we need a unitive criterion(not CPU occupancy) to measure the performance of all the swfs.
I had an idea, that is to calculate the number of...
Hi guys.
I am wondering about general performance of LINQ. I admit, that it comes handy but how performant is LINQ? I know that is a broad question. So I want to ask about a particular example:
I have an anonymous type:
var users = reader.Select(user => new MembershipUser(reader.Name, reader Age));
And now, I want to convert it to t...
So I've read some stuff about multithreading and NSOperation and wondering how I can use that to improve my app. Using Instruments I have isolated a few places where my app could definitely use a speed improvement. My question is, are these kinds of things suitable for another thread using NSOperation?
Drawing a view: I have a rather co...
I just fired up Reflector and peered into MultiCastDelegate.CombineImpl and saw some very lengthy code... every time two delegates are combined (read: every time you attached more than one event handler to an event), the following code gets run, which seems inefficient for such a fundamental performance critical feature. Does anyone k...
I have the following simple table that contains traffic measurement data:
CREATE TABLE "TrafficData"
(
"RoadID" character varying NOT NULL,
"DateID" numeric NOT NULL,
"ExactDateTime" timestamp NOT NULL,
"CarsSpeed" numeric NOT NULL,
"CarsCount" numeric NOT NULL
)
CREATE INDEX "RoadDate_Idx" ON "TrafficData" USING btree ("RoadI...
im making a jquery autocomplete, i have something between 10~20k registers
the data is static (i'll run a update script when i need) and i can choose to get the file from a json or embed in the page in a single line, like:
var title = ["example title 1","example title 2"];
which one should i choose, perfomance wise? (also im worried ...
Is there any difference in performance (in terms of inserting/updating & querying) a table if the primary key is a single column (e.g., a GUID generated for every row) or multiple columns (e.g., a foreign key GUID + an offset number)?
I would assume querying speeds should be quicker if anything with multi-column primary keys, however I ...
Lets say that you are trying to figure out what the best path to take is. You have z number of possible moves and can make x number of moves at the same time. You always do x number of moves at once, no more or less. How can you figure out the branching factor in terms of x and z?
...
I found that dictionary lookup could be very slow if compared to flat array access. Any idea why? I'm using Ants Profiler for performance testing. Here's a sample function that reproduces the problem:
private static void NodeDisplace()
{
var nodeDisplacement = new Dictionary<double, double[]>();
var times = new ...
I am solving a problem of transferring images from a camera in a loop from a client (a robot with camera) to a server (PC).
I am trying to come up with ideas how to maximize the transfer speed so I can get the best possible FPS (that is because I want to create a live video stream out of the transferred images). Disregarding the physica...
Dear friends,
I am working on an Adobe AIR (2.0) application that contains a feature to allow users to print documents (such as salary slips). Those documents are originally in PDF format. Due to circumstances we cannot directly display those PDFs in the AIR application (for example using flash.html.HTMLLoader). Therefore we convert the...
Hello,
I'm considering the option of using anonymous { } code blocks to logically distinguish "code blocks" inside the same method call, something that (theoretically) should improve readability of the code.
I'm wondering which of the following 2 code segments is better to your eyes?
Also, are the 2 code segments compile to the same b...
Hi,
I wrote a simple AJAX callback function in Drupal that performs a query to the DB and returns a JSON formatted string. Nothing fancy, the standard AJAX declaration in the module with a modest amount of information (less than 4KB). The query to the database takes 52ms. Drupal adds around 320ms of overhead for a total of 370ms + laten...
I'm setting up an image cluster for a webpage (similar to sprite-map) for performance reasons. I have a utility that generates the master image, and css to reference the image map.
For simplicity sake, I'd rather include the new css after the regular css file, instead of writing a script to search and replace all the classes in the orig...
There are number of performance tips made obsolete by Java compiler and especially Profile-guided optimization. For example, these platform-provided optimizations can drastically (according to sources) reduces the cost of virtual function calls. VM is also capable of method inlining, loop unrolling etc.
What are other performance optimi...
I have this slow query
select * from table1 where id NOT IN ( select id from table2 )
Would this be faster by doing something like (not sure if this is possible):
select * from table1 where id not in ( select id from table2 where id = table1.id )
Or:
select * from table1 where table1.id NOT EXIST( select id from table2 where table...