I have created an application (a web-based application) which now has a large number of associations. Simply put, an Account:
has many Users
has Settings
has many Projects
Similarly a Project:
has many Items
A User:
has many Tasks
And so on, with loads more associations. Nothing particularly unusual about that I hope. I chose...
I have a method which needs to be as fast as it possibly can, it uses unsafe memory pointers and its my first foray into this type of coding so I know it can probably be faster.
/// <summary>
/// Copies bitmapdata from one bitmap to another at a specified point on the output bitmapdata
/// </summary>
/// <param name="sou...
Hi,
I am creating a service which receives some data from mobile phones and saves it to the database.
The phone is sending the data every 250 ms. As I noticed that the delay for data storing is increasing I tried to run WireShark and write a log as well.
I noticed that the web requests from mobile phone are being made without the dela...
I am seeing high pgfree/s values in sar for an application. Generally is this an issue I should be concerned about? If so, what is generally the cause, spending time lots of time in GC?
...
Have a huge mysql table with like 300,000 records and wanted to page the records in PHP (not the point here though) with a query in this manner:
SELECT * FROM `table` LIMIT 250000, 100
It could be majorly slow in the latter part of the records, especially when near the end of the table (LIMIT start very large). My guess is MySQL has t...
I'm working on a PHP project with solid unit-tests coverage.
I've noticed, that last time, I'm making very tricky manipulations with unit-tests Command-Line Test Runner' --filter command.
Here is this command's explanation from official documentation:
--filter
Only runs tests whose name matches the given pattern. The ...
I see a lot of answers like this one:
Printing a list of persons with more than one home each home with more than one
I have tried that answer with similar models and it seems like a terribly inefficient way of doing this. Each iteration seems to make a separate query sometimes resulting in thousands of queries to a database. I realize...
When to use it and why?
My question comes from the sentence: "hash cons with some classes and compare their instances with reference equality"
...
I have a 384MB text file with 50 million lines. Each line contains 2 space-separated integers: a key and a value. The file is sorted by key. I need an efficient way of looking up the values of a list of about 200 keys in Python.
My current approach is included below. It takes 30 seconds. There must be more efficient Python foo to get th...
Hi,
I'm using UIImage to render a game map from 32x32 blocks. The code is as follows
for( int x = 0; x < rwidth; ++x)
{
for(int y = 0; y < rheight; ++y)
{
int bindex = [current_map GetTileIndex:x :y];
CGPoint p;
p.x = x * tile_size_x;
p.y = y * tile_size_x;
[img_list[bindex] drawAtPoint:p];
}
}
This ends up rendering abo...
I'm creating a windows console application that will read text file line by line and extract the data from the string that is fixed length data. The application is written as windows application for now but will convert to windows console app later on. I've notice that it take a while for the application to run from reading the text, ins...
We have large SQL Server 2008 databases. Very often we'll have to run massive data imports into the databases that take a couple hours. During that time everyone else's read and small write speeds slow down a ton.
I'm looking for a solution where maybe we setup one database server that is used for bulk writing and then two other databa...
I am a bit confused about how php buffering works.
Let's say you have a php page foo.php and output_buffering = 4096 in php.ini, and Apache recieves a get request for foo.php. foo.php starts executing, and as soon as 4096 bytes are ready, they are sent to Apache. Apache starts sending those 4096 bytes to the client.
Here's what I d...
Since I use jQuery 1.3+ all except one timed test is using that. The other is plain javascript I found from back in 2000. I stopped going that route as it was taking around 150 seconds to run the test. I've read quite a few jQuery optimization web pages that relate to selecting a single element. A '#id' is the best case for using tha...
We have a big winforms C# application, that's basically a frontend for some databases (CRUD stuff) and I'm trying to implement some in memory cache for business objects.
Something like:
List<Customer> customerCache; // Loaded during app. startup
I've already created some code to keep the cache up-to-date with the database. This code...
Hi, Can you guys help me determine the performance difference of each of these
statements? Which one would you use?
Making a new Array using
- var new_list = new Array(); or
- var new_list = []
Appending element using
push('a')
new_list[i]; (if i know the length)
Ternary operator or if() {} else (){}
Trying to make isodd fun...
Hi all,
I have inherited a single project in svn: 30Gb in over 300 000 files. There are tons of binary files in there mostly in an images folder. Operations like updating the entire project can be dramatically slow.
The team has evolved a process to only run update/switch on the specific folders they are working on and end up checking...
Hi all,
I need to make some performance improvements on a web site and made some major improvements, but now I stuck with a strange problem.
When cached, my starting page only needs to load one element (the "root document") - but then it needs some time until it's rendered completely:
The elements following are things loaded asynchr...
I'm working on a project which is in serious need of some performance tuning.
How do I write a test that fails if my optimizations do not in improve the speed of the program?
To elaborate a bit:
The problem is not discovering which parts to optimize. I can use various profiling and benchmarking tools for that.
The problem is using au...
I am building a client-server based solution; client being a desktop application and the server being a web application.
Basically, I need to monitor the performance and resource utilization of the client, which is a .NET 2.0 based Windows Desktop application.
The most important thing I need to monitor is the network resources the clie...