performance

jQuery .data() vs HTML5 data-XXX performance

I found this test http://jsbin.com/ekofa/2 that shows that HTML5 data-XXX is faster then jQuery .data(). I am starting a project that require lots of small data pieces placed on HTML elements where performance is crucial. Should I use .data() or HTML5 data-XXX? Is that test relevant and accurate? ...

Is it possible to drop a primary key index in MySQL?

Is it possible to drop a primary key index in MySQL (version 5.1.47). This is to optimize the insert performance. ...

MS Access performace dlookup on query or dsum?

I know that all of the domain aggregate functions are slow, but I am looking for the least of the evils. Which will be the faster of the following two options? Create a query that will group by the unique value and sum the total. Have dlookup to get my sum from the query. Do a dsum on the main table with the criteria being the same as...

How to troubleshoot sql server performance problem

Ok this general problem has reared its ugly head twice in the past 6 months (different stored procedure). We have our internal users report a timeout error in the application. We can reproduce the problem in the application in a controlled environment. So we go through the normal steps of checking for blocking using sp_who2. Everything l...

What should I choose: MongoDB/Cassandra/Redis/CouchDB?

Hi, We're developing a really big project and I was wondering if anyone can give me some advice about what DB backend should we pick. Our system is compound by 1100 electronic devices that send a signal to a central server and then the server stores the signal info (the signal is about 35 bytes long). How ever these devices will be se...

-XX:+HeapDumpOnOutOfMemoryError specify memory

Hi, I would like to specify amount of memory used when -XX:+HeapDumpOnOutOfMemoryError VM argument is used. Normally, I control the heap size using -Xmx<size> VM argument. But when I do that the out of memory error never occurs. Does anybody know a way to specify such a parameter so that when the heap size (or even the stack size) reach...

PHP Performance Measurement

How can I benchmark certain peices of code in PHP? I can use timers to calculate the differences, I'm just not sure if it is the best solution out there. ...

SQL optimization/tweaking

I have this SQL Server query SELECT count(distinct [IP]) as GlobalUniqueIPcount, --RangeUniqueIPcount (SELECT count(distinct [IP]) FROM [tblSequence] WHERE SiteID = @siteID AND ([Timestamp] > DATEADD(dd, -@days, (LEFT(GETDATE(),12))))) as RangeUniqueIPcount, --RangeUrlUniqueIPcount (SELECT count(distinct [IP]) FROM [tbl...

ListView vs LinearLayout

Hi, I'm writing a horizontal tv-view, similar to the ones you know form tivo systems and similar. For each channel there is a row with the programmes for the next 6 hours or so, with a width proportional with their play time. My Idea is to write a custom widget for each row, and stack these on top of each other. This should allow me to ...

MySQL Updates are taking forever

Hey, im trying to wirte about 600000 Tokens into my MySQL Database Table. The Engine I'm using is InnoDB. The update process is taking forever :(. So my best guess is that I'm totally missing something in my code and that what I'm doing is just plain stupid. Perhaps someone has a spontaneous idea about what seems to eat my performance: ...

MySQL implications of 'like' vs 'join' query

I've got two tables - Videos and Playlists Typically I would create the two respective tables and a multi-value table for the 1-Many relationship, such that : Videos = [pk, videoId, title, etc..] Playlists = [pk, title, etc..] Playlists_Videos = [VideosFK, PlaylistFK] Alternatively, I've been thinking about creating the two tables on...

Porting old apps from Python 2.4

Hi, I have a bunch of apps written in Python 2.4. I'd like to port them onto more recent version of the interpreter. Let's say I have no need of syntax features, but I am very concerned about performance. So which of the upper python versions is the fastest (the most optimized) - 2.4 or 2.5 or 2.6 or 2.7 ? Performance comparison artic...

Which java webframework for high performance and scalability

I have to design a java based web application, it should support be highly scalable, should support almost 500 concurrent users with response time less than 3 secs. I have short listed 5 frameworks(Struts, Spring MVC, JSF, Wicket and GWT). My questions are: 1.I want to compare the performance of these framworks similar to the way it de...

Difference between performance of the two sql queries?

I have a field in my table having text data type. Is there a difference in performance for the following two sql queries: select * from tablename where fieldname="xyz%"; select * from tablename where fieldname="%zyx"; If we were to implement the execution of these queries, this is what I think we would need to do: We have to match...

C++: Union vs Bitwise operators

Hi, I have two char's and I want to "stitch" them bitwise together. For example: char c1 = 11; // 0000 1011 char c2 = 5; // 0000 0101 short int si = stitch(c1, c2); // 0000 1011 0000 0101 So, what I first tried was with bitwise operators: short int stitch(char c1, char c2) { return (c1 << 8) | c2; } But this doesn't work: I'm...

Is a C++ program really slower than a similar C program?

Assume that i have written a program in C++ without using RTTI and run-time polymorphism (no virtual function, no virtual inheritance) and classes don't have private/protected members, also the C++ specific header files are not used (i.e. C header files are used: cstring, cstdio, ... instead of string, iostream, ...). Then i want to wri...

Modern CPU Inner Loop Indirection Optimizations

From http://www.boost.org/community/implementation_variations.html "... coding differences such as changing a class from virtual to non-virtual members or removing a level of indirection are unlikely to make any measurable difference unless deep in an inner loop. And even in an inner loop, modern CPUs often execute such competing code s...

The CPU idle is set to 99 while using vmstat, what does this mean?

I am confused with the CPU idle time is set to 99. Does this mean the CPU is idle not doing anything for 99% of the time? #vmstate procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 2336 18512 263972 1048992 0 0 ...

HTML5 Canvas Performance: Loading Images vs Drawing

I'm planning on writing a game using javascript / canvas and I just had 1 question: What kind of performance considerations should I think about in regards to loading images vs just drawing using canvas' methods. Because my game will be using very simple geometry for the art (circles, squares, lines), either method will be easy to use. I...

How can JVM implementations like Jython and JRuby beat their native counterparts?

I was watching this video here, where Robert Nicholson discusses P8, an implementation of PHP on the JVM. At some point he mentions that they aim to surpass native PHP in performance some time in the future. He mentions JRuby and Jython, which started out slower than their native counterparts, but eventually surpassed them. Quercus, an...