When I define columns in MySQL I generally use int, varchar(255), text and the occasional enum for boolean. What are the benifits of accurately specifying column types rather than just leaving them at maximum?
For example a password field encoded as MD5 will never exceed 32 characters so is there a tangible performance gain from using ...
I have the following class subclass of FilterInputStream with only one method overrided. However the performance of this class is so poor. It performs at 1/10 the speed of its superclass. I even took the same source code from InputStream of javasrc and used it in my subclass. Same performance hit. Is there something wrong with overriding...
I often run into the case where I want to eval a query right where I declare it. This is usually because I need to iterate over it multiple times and it is expensive to compute. For example:
string raw = "...";
var lines = (from l in raw.Split('\n')
let ll = l.Trim()
where !string.IsNullOrEmpty(ll)
...
If I have the following code:
IterateArray(object[] array)
{
for(int i=0; i<array.length; i++)
{
Dosomething(array[i]);
}
}
and the Dosomething(object) method's time performance is O(log n), is the overall performance of IterateArray O(n) or O(n log n)?
Thanks.
...
I've been playing around with the Boyer-Moore sting search algorithm and starting with a base code set from Shriphani Palakodety I created 2 additional versions (v2 and v3) - each making some modifications such as removing len() function from the loop and than refactoring the while/if conditions. From v1 to v2 I see about a 10%-15% impr...
I have a fairly simple query:
SELECT
col1,
col2…
FROM
dbo.My_Table
WHERE
col1 = @col1 AND
col2 = @col2 AND
col3 <= @col3
It was performing horribly, so I added an index on col1, col2, col3 (int, bit, and datetime). When I checked the query plan it was ignoring my index. I tried reordering the columns in t...
I have a website that is hanging every 5 or 10 requests. When it works, it works fast, but if you leave the browser sit for a couple minutes and then click a link, it just hangs without responding. The user has to push refresh a few times in the browser and then it runs fast again.
I'm running .NET 3.5, ASP.NET MVC 1.0 on IIS 7.0 (Win...
Hello everyone,
I am new to programming in general so please keep that in mind when you answer my question.
I have a program that takes a large 3D array (1 billion elements) and sums up elements along the various axis to produce a 2D array of a projection of each side of the data. The problem here is that it is very ram intensive as th...
Putting code at aspx files is slower? The code is recompiled every access?
At my mind, code at aspx file is compiled at first access together their dll(maybe in Page_Init) and moved to Temp Asp.Net folder. And .aspx file just is necessary for IIS found a file.
...
Have you ever had to justify the choice over using .Net instead of Java based on performance?
For a typical high volume transaction processing system that can perform the following operations,
Concurrent Database transactions
Mathematical computations
Interaction with other web services (SOAP/XML, XML-RPC)
My approach would be to co...
Over the past few weeks I have been building a prototype application using a Flex front end connected to a J2EE backend using blazeDS.
The prototype is an experiment to learn flex and see what its suitability is for a complex trading application requiring a large number of dynamic updates (i.e > 20 a second) via a pub sub type model.
D...
What can be the various performance testing scenarios to be considered for a website with huge traffic? Is there any way to identify the elements of the code which are adversely affecting the site performance?
Please provide something similar to checklist of generalised scenarios to be tested to ensure proper performance testing.
...
I have a memory block that is divided into a series of location that can be retrieved and returned by client code.
The method that returns locations back looks like this:
void ReturnLocation(void *address) {
int location = AddressToLocation(address); // I need the location here
// some code
DoSmthA(location);
}
void DoSmth...
Hi,
is it better to do this (regarding performance, not readability...):
$('a.updateCartButton').click(function() {
$('form[name=updateCartForm]').attr('action', $(this).attr('href') + '#' + $('img[id^=iconUpdateArticle]').attr('id')).submit();
return false;
});
or this:
$('a.updateCartButton').click(function() {
var actionHre...
in our sql server box(X64 machine with 8 core with 16G Ram), we found the performance is really bad after we a bunch of data been generated, some time we even cannot RDP to this box, there have several err msg on SQL error log as following:
*2009-06-26 12:11:09.92 spid63 Error: 14151, Severity: 18, State: 1.
2009-06-26 12:11:09.92...
I have just read this interesting article about the implementation details for various languages that support regular expressions.
It describes an alternative implementation of regular expressions that uses non-deterministic finite automatons (NFAs) versus deterministic ones (DFAs). It claims that back-tracking DFA implementations (t...
I've a PS script which I use to keep track of my VMWare ESX servers. I need to run it as a service so that I'm not permanently logged on. Unfortunately, the script runs more slowly if I use a runspace inside a service rather than just running the script through the powershell console. It's taking 2-5 minutes to make calls to the VMWare w...
I'm currently working out the layout of a WPF Application and seem to have it a bit of a snag in the layout of one of my controls. This control is a dynamically sizing, so it should fit the size of the viewport it's a part of. The problem I'm running into is a very visual problem, so I'll do my best to describe it. Here's what it looks l...
Hello,
I'm using MS SQL Server 2005.
What's the best schema for a Wiki-like system? where users edit/revise a submission and the system keeps track of these submissions.
Lets say we're doing a simple wiki-based system. Will keep track of each revision plus views and latest activity of each revision. In other screens, the system will l...
Hi
I'm running IBM's jvm (jdk 5.0) with the options -XrunHprof:format=b
I'm aware that instrumenting jvm with hprof involves a performance penality. I would like to quantify that penality. I know that one way to do this is to take off the hprof profiling and run the application, and compare the application's cpu utilization in both cas...