I'm doing some code cleanup, and I came across a few instances of
System.Threading.Thread.Sleep(2000);
These are all in Button Click events.
I can't think of any reason why this would be in production code?
Am I missing something?
EDIT --
Full Code Block (some things changed, but steps are the same) -- And yes, I think it sucks t...
Is there a difference in the runtime of the following two snippets?
SNIPPET 1:
for ( Object obj : collection ) {
step1( obj );
step2( obj );
step3( obj );
}
SNIPPET 2:
for ( Object obj : collection ) {
step1( obj );
}
for ( Object obj : collection ) {
step2( obj );
}
for ( Object obj : collection ) {
step3...
I have a C# windows service acting as a server, the service holds some large (>8Gb) data structures in memory and exposes search methods to clients via remoting.
The avg search operation is executed in <200ms and the service handles up to 20 request/sec.
I'm noticing some serious performance degradation (>6000ms) on a regular basis fo...
I need to do some performance/load testing on this website - Information Queensland Atlas
In the past I have used Jmeter and WAPT 5 with reasonable success however in those cases the websites being testing did not make use of AJAX. For the website above I need to simulate a number of users and determine the capacity of the current serv...
When using the FindAll() method of the DirectorySearcher in .net, does the GetDirectoryEntry() method of the SearchResultCollection require another trip to Active Directory? e.g....
Dim src As SearchResultCollection
Dim ds As New DirectorySearcher
' code to setup DirectorySearcher
' go to Active Directory and fill collection with resu...
Hi
WE use a third party report tool. Report tool uses active-x.
At first we generate and run a query accırding to filters, then one report file is created which inculdes the data (result of the query). Then client downloads the report file. But file written operation is a big problem for us. What can we do? Taking file written operations...
I have a question reagrding Oracle materialized views ...
We have two databases:
Core Database
Reporting database
The reporting database has:
a database link to the Core database
a number of synonyms to the tables in the Core database
a number of Materialized views defined on top of those synonyms.
The views are set up to refres...
I am currently trying to optimize some DSP related code with Shark and found that I am wasting a lot of time in a float to integer conversion:
SInt16 nextInt = nextFloat * 32768.0f + 0.5f;
As the iPhone seems to have an ARM11 FP co-processor, I am wondering if I can replace my code with the FTOSI instruction.
There is some documentati...
Hi
this is my first question on stack overflow, so please be kind.
i am running an app with
spring 2.5.x
Configurable Annotations
Compile time weaving (CTW)
maven
eclipse/ajdt
I use CTW and everything runs fine. But if i instantiate an annotated class for the first time it takes very long. the second time it is very fast.
Looking ...
Hi,
I'm having trouble getting a decent query time out of a large MySQL table, currently its taking over 20 seconds. The problem lies in the GROUP BY as MySQL needs to run a filesort but I don't see how I can get around this
QUERY:
SELECT play_date, COUNT(DISTINCT(email)) AS count
FROM log
WHERE type = 'play'
AND play_date BETWEEN ...
I would like to copy a relatively short sequence of memory (less than 1 KB, typically 2-200 bytes) in a time critical function. The best code for this on CPU side seems to be rep movsd. However I somehow cannot make my compiler to generate this code. I hoped (and I vaguely remember seeing so) using memcpy would do this using compiler bui...
I'm using Core Data to store lists of data. So, there's parent objects with any number of child objects. Core Data does a great job keeping my memory use low while I'm inserting objects and reading but when I do a delete operation the memory spikes way up.
When I delete a parent object with ~5000 children the cascade delete uses ~10MB. ...
What is the fastest SQL Server connection protocol?
Related: which protocols are available remote versus local, and does that affect the choice of fastest protocol?
...
What is the main purpose of using CROSS APPLY?
I have read (vaguely, through posts on the Internet) that cross apply can be more efficient when selecting over large data sets if you are partitioning. (Paging comes to mind)
I also know that CROSS APPLY doesn't require a UDF as the right-table.
In most INNER JOIN queries (one-to-many re...
I have company, customer, supplier etc tables which all have address information related columns.
I am trying to figure out if I should create a new table 'addresses' and separate all address columns to that.
Having address columns on all tables is easy to use and query but I am not sure if it is the right way of doing it from a good d...
I have a class that retrieves its memeber (more or less 10 members) from a database.
My question is: is it more efficient to fetch them every time from the db (MySQL), leaving just an ID in the session's array or store them directly in the session's array?
And is the difference in performance terms so great? (given a database with say ...
I have written some code that uses attributes of an object:
class Foo:
def __init__(self):
self.bar = "baz"
myFoo = Foo()
print (myFoo.bar)
Now I want to do some fancy calculation to return bar. I could use @property to make methods act as the attribute bar, or I could refactor my code to use myFoo.bar().
Should I go back...
Performance consideration: Spread rows in multiple tables vs concentrate all rows in one table.
Hi.
I need to log information about about every step that goes on in the application in an SQL DB.
There are certain tables, I want the log should be related to:
Product - should log when a product has been created changed etc.
Order - same ...
Steps to reproduce:
Create a new solution/add new WPF Application project.
place just a canvas in the main window.
create a RotateTransform + PageUp/Down events for incrementing the angle with +-10.
place 50 polygons on the canvas
Press PageUp/Down (and keep pressed)
On my PC the CPU usage is 80%.
Now try placing 1000 polygons and ...
Subject to this question, asks it all:How effective is executeBatch method? Is there a performance benchmark, that says.. 'if you have 1000 records to be inserted, using a executeBatch instead of executeUpdate saves you x amount of database cycles?'
Or Is this just a convention?
EDIT:
Here is what I am working with: a DB2 V 8.1 hoste...