I need a collection data-structure that can do the following:
Be sorted
Allow me to quickly pop values off the front and back of the list O(log n)
Remain sorted after I insert a new value
Allow a user-specified comparison function, as I will be storing tuples and want to sort on a particular value
Thread-safety is not required
Optiona...
I tried this sample here:
http://9elements.com/io/projects/html5/canvas/
After a few minutes, Firefox slows down so much I can't even popup any menu. When I closed the tab, Firefox comes back to normal again.
So is HTML 5 really a good choice now ?
...
Hello,
I am indexing about 100M documents that consist of a few string identifiers and a hundred or so numaric terms.. I won't be doing range queries, so I haven't dugg too deep into Numaric Field but I'm not thinking its the right choose here.
My problem is that the query performance degrades quickly when I start adding OR criteria...
In particular on the 2G and 3G models?
...
I'm puzzled with this.
In my machine
Direct calculation: 375 ms
Method calculation: 3594 ms, about TEN times SLOWER
If I place the method calulation BEFORE the direct calculation, both times are SIMILAR.
Woud you check it in your machine?
class Test {
static long COUNT = 50000 * 10000;
private static long BEFORE;
/*--...
I've heard this term used, but I'm not entirely sure what it means, so:
What DOES it mean and what DOESN'T it mean?
What are some examples of what IS and ISN'T microbenchmarking?
What are the dangers of microbenchmarking and how do you avoid it?
(or is it a good thing?)
...
I need to display an unknown length sequence of dictionaries with unknown keys efficiently in a data grid. This sequence is the result of a potentially slow LINQ query that could contain any number of results.
At first I thought that VirtualMode on DataGridView was what I was looking for but it appears that the number of rows and column...
Sorry for the long question, but I think this is an interesting situation and I couldn't find any explanations for it:
I was involved in optimization of an application that performed a large number of sequential SELECT and INSERT statements on a single dedicated SQL Server database.
The process needs to INSERT a large number of records...
Hi,
I have a question regarding a semi-constant update in a database. In short it is regarding a checkout function on a web page, which each time the checkout function is evoked it do five steps.
I want to try to optimize this function and have my eye on a step where I update a table each time the checkout is performed. I take the info...
I've gotten to that point in one of my projects, and haven't found much information out there. So if you've got some pointers for improving performance in the new Entity Framework 4, please let us know!
...
Hi,
I'm working on a system that requires high file I/O performance (with C#).
Basically, I'm filling up large files (~100MB) from the start of the file until the end of the file.
Every ~5 seconds I'm adding ~5MB to the file (sequentially from the start of the file), on every bulk I'm flushing the stream.
Every few minutes I need to upda...
I'm getting no improvement in speed when using Ehcache with Hibernate
Here are the results I get when i run the test below. The test is reading 80 Stop objects and then the same 80 Stop objects again using the cache.
On the second read it is hitting the cache, but there is no improvement in speed. Any idea's on what I'm doing wrong?
...
What are the performance issues associated with generating 100's of dynamic methods in Ruby?
I've been interested in using the Ruby Preferences Gem and noticed that it generates a bunch of helper methods for each preference you set.
For instance:
class User < ActiveRecord::Base
preference :hot_salsa
end
...generates something like...
I'm building a map viewer much like Google maps and i've run into an interesting performance problem when a page is zoomed (i.e ctrl + OR ctrl -). It seems to affect all major browsers but Firefox has the worst problems as far as I can tell.
The problem is that when the page is zoomed panning by dragging the mouse seems really sluggish....
Hello, I started working with C# a few weeks ago and I'm now in a situation where I need to build up a "bit set" flag to handle different cases in an algorithm. I have thus two options:
enum RelativePositioning
{
LEFT = 0,
RIGHT = 1,
BOTTOM = 2,
TOP = 3,
FRONT = 4,
BACK = 5
}
...
When I try to do an entityManager.remove(instance) the underlying JPA provider issues a separate delete operation on each of the GroupUser entity. I feel this is not right from a performance perspective, since if a Group has 1000 users there will be 1001 calls issued to delete the entire group and itr groupuser entity.
Would it make mor...
I am planning on using CouchDB on a project. But as the querying mechanism involves writing views (which are a lot like indexes on regular RDMBMS's) I was wondering, if the document database keeps getting updated a lot ( a write heavy database) would CouchDB perform well compared to a regular RDBMS? Or do we have to compact/re-index the ...
Let's assume I have a table with field of type VARCHAR. And I need to get data from that table sorted alphabetically by that field.
What is the best way (for performance): add order by field to the SQL-query or sort the data when it's already fetched?
I'm using Java (with Hibernate), but I can't tell anything about DB engine. It could...
For a scientific project of mine I am developing (in C#4 and T-SQL) an application potentially meant to handle very big quantities of very simple records performing simple operations with them (a scientific simulation engine, not a linear time-series cruncher). I'd like to use 64-bit integers as primary keys for better capacity.
I am ...
Is there a faster way then to simply catch an exception like below?
try
{
date = new DateTime(model_.Date.Year, model_.Date.Month, (7 * multiplier) + (7 - dow) + 2);
}
catch (Exception)
{
// This is an invalid date
}
...