From Wikipedia:
The main disadvantages are greater
overall space usage and slower
indexing, both of which become more
severe as the tree structure becomes
larger and deeper. However, many
practical applications of indexing
involve only iteration over the
string, which remains fast as long as
the leaf nodes are large e...
We have MSSQL, some C# web services, some ASP.NET, and some AJAX. We're having terrible load times, normally 2-3 seconds to refresh a page, sometimes far more. I have no idea where to start.
What profiling tools are there, across the entire end-to-end, to identify where the biggest bottlenecks are?
...
From a post-compilation perspective (rather than a coding syntax perspective), in C#, is there any actual difference in the compiled code between a set of operations that have occurred on one line to a set of operations that occur across multiple lines?
This
object anObject = new object();
anObject = this.FindName("rec"+keyPlayed.ToStr...
Hi guys,
I've wrote some code that will check two dates - they are split into two day inputs (#enddate-1-dd, #date-1-dd), two month inputs (#enddate-1-mm, #date-1-mm) and two year inputs (#enddate-1, #date-1)
I wanted to check first of all that they're all actually numbers, but then I wanted to check each one to make sure it's in a dat...
There's information that my web-app needs from my database that I can only generate for the entire database with many queries populating a brand new table. Can anyone suggest to me a single query that returns the results the exact same as this populated table?
First, here are the two tables that have the information.
CREATE OR REPLACE ...
SQL Server 2008. I have this very large query which has a high cost associated with it. TOAD has Query Tuning functionality in it and the only change made was the following:
Before:
LEFT OUTER JOIN (SELECT RIN_EXT.rejected,
RIN_EXT.scar,
RIN.fcreceiver,
...
In J2ME we have the clipRect() and setClip() to clip a region in the Graphics area. What is the equivalent apis available in BlackBerry and how do we use it?
...
Assuming that there's a table called tree_node, that has the primary key called id and has a nullable column called parent_id and the table embeds a tree structure (or a forest), how can one compute the depth of a node in the tree/forest in an efficient way in SQL?
...
R is a scripting language, but is it fast? It seems like a lot of the packages used by R are actually compiled from C. Does anyone have an example of how using languages like C or Java instead of R caused a noticeable increase in speed? Is there a fair benchmark somewhere? Is there a C (or any other compiled) library that has many of...
Suppose, for illustrative purposes, you are running a library using a simple MySQL "books" table with three columns:
(id, title, status)
id is the primary key
title is the title of the book
status could be an enum describing the book's current state (e.g. AVAILABLE, CHECKEDOUT, PROCESSING, MISSING)
A simple query to report how many...
I wonder what are your most common sql optimization that you used.
...
Two questions rolled into one here...
I have a number of functions which are called multiple times per frame for a real-time video processing application. Taking advice about const and pass by reference, the functions have a signature somewhat like this
void processSomething(const int& value);
As I keep typing the few extra character...
I'm working on a Winforms app with NHibernate as my ORM layer. Everything is going well, but it doesn't seem that NHibernate is respecting my instructions to not use lazy loading.
Problem 1:
The app is a task list type of thing, and tasks can have child tasks. I'm representing these in a TreeView, so I need to first add nodes for top-l...
The basic table schema looks something like this (I'm using MySQL BTW):
integer unsigned vector-id
integer unsigned fk-attribute-id
float attribute-value
primary key (vector-id,fk-attribute-id)
The vector is represented as multiple records in the table with the same vector-id
I need to build a separate table with the dot product (al...
Hello
I have a simple C# 2008 application which displays a png-picture and handles some simple MouseEvents.
Although it's nothing complex, it uses at least 9.5-10 MB of memory (as shown in task-manager)
I've already disabled any type of error logging as well as I removed debug and trace symbols. "Optimize Code" is activated.
Is ther...
What is the best implementation, from a performance point of view, of branched function calls?
In the naive case we have a rather large switch statement that interprets bytecode and executes a function call depending on code.
In the normal case we have computed gotos and labels that do the same thing.
What is the absolute best way t...
I'm using jQuery. I have website feature that does an ajax search and returns a JSON result. The ajax callback then populates the rows of a table with the results. Generally, there are 100 rows per search that get inserted. Each row has a fair amount of data.
The code looks something like this (very much abbreviated):
function sear...
This is a snippet of disassembled avr code from a C project I'm working on. I noticed this curious code being generated and I can't understand how it works. I'm assuming it's some sort of ridiculous optimization...
Can anyone explain?
92: ticks++;
+0000009F: 91900104 LDS R25,0x0104 Load direct from data space
+0...
I read a table with more than 1 million records from a database. It takes 3 minutes until I have a populated object in memory. I wanted to optimize this process, and serialized this object to a file using binary BinaryFormatter. It created a file with 1/2 GB size. After I deserialized this file back to memory object. This took 11 minutes...
I have a performance problem related to string comparison (in Java).
I'm working on a project that needs to sort a huge list (a TableViewer in Eclipse). Anyway I've pinpointed the bottleneck down to the call to compareTo() for the string to be compared.
Is there any way to optimize the performance of a string compare? I've searched and...