I have a simple HTML Table (10 columns x 500 rows). When the page loads I start to scroll down and the browser hangs, and won't allow me to scroll for 3-5 seconds. This usually happens around row 75-100. Sometimes I have to scroll all the way to the bottom, and start scrolling back up to the top. Either way, it is rare that I don't e...
I am thinking of making a simple game engine for my course final year project. I want it to be modular and expandable so that I can add new parts if I have time. For example I would make a graphics engine that would be completely independent of the other systems, once that was finished I could add a physics engine etc.
I would also want ...
Hi all,
While doing performance testing on windows, i usually use perfmon. But when i put load, the CPU % is varying too much if i set the interval in perfmon as 1 sec and its not varying too much if i set the interval in perfmon as 15 sec(default one). Which interval is best to measure CPU performance for an application in windows? If p...
I can read unmanaged memory in C# using UnmanagedMemoryStream, but how can I do the reverse?
I want to read from a managed stream directly into unmanaged memory, instead of first reading into a byte[] and then copying. I'm doing async stream reading on a large number of requests, so the added memory is significant (not to mention the a...
The scheduler that runs as a daemon in JVM to garbage collect objects, can it be monitored with JMX.Do we have some way of telling that these are the objects it might garbage collect now.That way we can figure out that if we are creating specific objects of our classes and the instances are held up in memory of when they can be garbage c...
Ok I need to build a query based on some user input to filter the results.
The query basically goes something like this:
SELECT * FROM my_table ORDER BY ordering_fld;
There are four text boxes in which users can choose to filter the data, meaning I'd have to dynamically build a "WHERE" clause into it for the first filter used and the...
In my limited experience, I've been on several projects that have had some sort of string utility class with methods to determine if a given string is a number. The idea has always been the same, however, the implementation has been different. Some surround a parse attempt with try/catch
public boolean isInteger(String str) {
try...
There are similar questions to this, but I don't think anyone has asked this particular question.
Scenario:
Customer - Order (where Order has a CustomerID) - OrderPart - Part
I want a query that returns a customer with all its orders and each order with its parts.
Now I have two main choices:
Use a nested loop (which produces separ...
I love YSlow for Firebug/Firefox, but I've hit a situation where I want to profile an HTTPS site, that doesn't physically work outside of IE6/7 (e.g. no IE8, no Firefox, no Chrome)
Fixing the site to work in all browsers is officially Step #1, but to do some analysis and benchmark the existing site (which will help in reporting overall ...
does one perform better over the other in terms of indexing/quering etc ?
e.g. declaring a column as
active Char(1) with 'Y' / 'N' values
vs
is_active tinyint with values 1 / 0
Anecdotally speaking most places it seems people prefer to use char(1)
whereas my tendency is to declare them as tinyint/int not the least because it's easy...
Performance question ...
I have a database of houses that have geolocation data (longitude & latitude).
What I want to do is find the best way to store the locational data in my MySQL (v5.0.24a) using InnoDB database-engine so that I can perform a lot of queries where I'm returning all the home records that are between x1 and x2 latitu...
I am in the preparation phase of the design a graph-based (or key-value) database library for C++ which many here will find similar to projects such as http://neo4j.org/.
Since this is a very early phase of design, my requirements are simple, unrefined and (I admit) probably still rather naive:
A directed acyclic graph
A tree-like st...
This question is about the way that Scala does pattern matching and recursion with lists and the performance thereof.
If I have a function that recurses over a list and I do it with matching on a cons, for example something like:
def myFunction(xs) = xs match {
case Nil => Nil
case x :: xs => «something» myFunction(xs)
}
in Hask...
double *d;
int length=10;
memset(d, length, 0);
//or
for (int i=length; i; i--)
d[i]=0.0;
...
If the value of @param is null, which is better to use:
WHERE t.column = COALESCE(@param, '')
WHERE t.column = IFNULL(@param, '')
WHERE (@param IS NULL OR t.column = @param)
Is the OR more expensive than comparing the column to a value that will return all values for the specified column? My understanding is that options 1 & 2 will ...
I am trying to optimize a query that does something like this:
SELECT
...
CASE WHEN (condition) THEN (expensive function call #1)
ELSE (expensive function call #2)
END
...
The query plan shows that for even in cases where 100% of rows satisfy the WHEN clause, a substantial portion of the time is spent in calls to the resu...
I want to use BigDecimal to represent arbitrary precision numbers like prices and amounts in a low-latency trading application with thousands of orders and execution reports per second.
I won't be doing many math operations on them, so the question is not about performance of the BigDecimal per se, but rather about how large volumes of...
I noticed in two applications to generate hashes of files, one written in Java and the other in C#, that the performance is horrible when reading from a DVD. I'm using Windows XP SP3. I noticed from the noise, that the drive keeps spinning down after reading a bunch of blocks, causing pauses of a couple of seconds between reads.
The str...
I feel my app has bad performance, and want to figure out which parts in code are evil. Is there a good tutorial somewhere on how to find these?
...
Which tools do you guys use? How do demangle c++ symbols do be able to pass it to profiler tools, such as opannotate?
Thanks
...