performance

Element host first time creation performance.

Hi , We have WPF app and sometimes we display windows panel with windows controls. And one of those controls can be again a WPF control, which is hosted in element host. WPF (MainWindow) WindowsFormsHost Windows(Panel) Elementhost WPF(usercontrol) This windows Panel on an average has 2-3 wpf controls. Ever...

Way to improve performance in MySQL on POINT(lat, long)

I have an application that needs to query a table with latitude and longitude coordinates, which are stored using MYSQL's POINT datatype. I have a stored function that finds nearby lats and longs within a given radius of a given GPS location. However, my table will contain hundreds of thousands of entries, so performance needs to be opt...

Is there a benefit of turning ViewState Encryption Off (asp.net IIS7)?

I understand how to turn off ViewState encryption for asp.net web applications. I want to know if I should. My question is more from a performance stand point than a security one (All of our traffic is on a private network and we do not store any sensitive data in the viewstate). Before I dedicate hours of setting up tests scenarios...

Performance: UUID vs auto-increment in cakephp-mysql

I was searching if UUID generated by cakePHP (32 char long) is faster in performance compared to auto-increment. Comparison in both inserts and Select operation. Which one should I use UUID generated by cakePHP or by using simple auto-increment of MySQL Here's is a case-study I found but its not specific to cakePHP http://krow.livejour...

Performance of Collection class in Java

All, I have been going through a lot of sites that post about the performance of various Collection classes for various actions i.e. adding an element, searching and deleting. But I also notice that all of them provide different environments in which the test was conducted i.e. O.S, memory, threads running etc. My question is, if there...

How to optimize CLASS function in jquery

I'm profiling JavaScript using dynaTrace AJAX edition. According to the tool's "Hot Spots", the following jQuery method is using the majority of execution time: CLASS(*, *, undefined, *, undefined, false): false ...it has over 700 invocations on my page. What is this call and how can I optimize it? I'm using jQuery version 1.4.2. T...

silverlight media player stutters when using javascript heavily

In one of my projects we have a streaming web site that needs to synchronize HTML content with a video stream down to a ~100 ms level. Currently we are using WMV and Microsoft's Mediaplayer ActiveX object for this, which basically limits us to IE as a platform. As a prototype a while ago I tried out a Silverlight based media player (cus...

Is there any performance difference between StringBuilder.append and assigning value to StringBuilder in java

I have a StringBuilder a. I have to append a's content to StringBuilder b. If b is null, then assign b=a, otherwise b.append(a.toString()). Is there any performance difference on checking if the StringBuilder is null or not? method_a(StringBuilder a, StringBuilder b) { if (b != null) { b.append(a.toString(); } else { ...

Relative performance of native C++ to Flash for pixel-pushing

I was trying to get a ballpark idea of how much slower Flash is at pure pixel-pushing 2D graphics than doing the same thing in SDL or other native library. For instance if I have a Flash/Flex app on a modern PC which each frame does a 2D loop and directly reads/sets every pixel, what equivalent PC would give the same performance for a na...

PHP vs Java performance and scalability comparison

Is there a good modern comparison (last couple years) of how Java performs and scales relative to PHP in a modern web application environment (Twitter, Facebook, COMET push) Is there any type of canonical web application that would be best to compare the 2 languages? (Full disclosure: I'm primarily a Java developer and I've worked with...

android: view cpu usage of processes

Hello! Is there a process manager or task viewer for android that shows how much CPU percentage each process or even each thread in a process takes up? Thanks! ...

Firefox 3.6 Javascript custom scrollbar performance

Hi, I have written a custom scrollbar class in javascript for use in a "freezepane" structure. Performance in most browsers (including IE6!!!) is good. But in firefox 3.6 (beta 4 is fine) it is very jerky. When the scrollbar is moved, the onmousemove event calculates a position then sends the new position to a callback that is setting ...

Is just setting a value faster than the checking of existance and only setting if doesn't exist - like in this Android / Java code?

Example: That code is run each time, when the listAdapter requests a new row: if (textViewTitle != null) textViewTitle.setTypeface(Controller.getInstance().widgetSettings.getBoldTypeface()); vs. if (textViewTitle != null && textViewTitle.getTypeface() != null && textViewTitle.getTypeface().equals(Controller.getIns...

Levenshtein DFA in .NET

Good afternoon, Does anyone know of an "out-of-the-box" implementation of Levenshtein DFA (deterministic finite automata) in .NET (or easily translatable to it)? I have a very big dictionary with more than 160000 different words, and I want to, given an inicial word w, find all known words at Levenshtein distance at most 2 of w in an ef...

Looking for a simplest (and fastest) example of TCP socket programming for windows, c or c++

Hi, I'm looking for a simplest (and fastest) example of TCP socket programming for windows, c or c++, whichever can get it accomplished faster, sending trival data, for example 1 byte, or several bytes, but in one packet. It's for research purposes. I googled and found several examples, however every single of out them looks a bit dif...

Performance of Win32 memory mapped files vs. CRT fopen/fread

I need to read (scan) a file sequentially and process its content. File size can be anything from very small (some KB) to very large (some GB). I tried two techniques using VC10/VS2010 on Windows 7 64-bit: Win32 memory mapped files (i.e. CreateFile, CreateFileMapping, MapViewOfFile, etc.) fopen and fread from CRT. I thought that mem...

About integers and memory management in Objective-C

I have this code in one of my projects (part of a loop): newPath = [tileMap updatePathFromNode:point1 toNode:point2]; int x,y; x = [[newPath objectAtIndex:0] nodeX]; y = [[newPath objectAtIndex:0] nodeY]; currFiend.motionTarget = ccp(x*20,y*20); I am now looking for areas around my entire project to optimize the code. What i'm curiou...

How to to reduce startup time and memory consumption of a java program?

I assume the latest update version of java would provide better performance. I am looking for a way to implement isolation of software components from endless loops or memory leaks. Android isolates each app in it's own process, Google Chrome isolates each tab in it's own process. My primary drawback is that java takes so long to start...

Benchmarks for JSON parsers?

I'm interested in benchmarks for various JSON parsing libraries, ideally, comparing Java and C/C++ implementations. Java only benchmarks by the Jackson folks: http://www.cowtowncoder.com/blog/archives/2009/02/entry_204.html Thanks! ...

idata.frame: Why error "is.data.frame(df) is not TRUE"?

I'm working with a large data frame called exp (file here) in R. In the interests of performance, it was suggested that I check out the idata.frame() function from plyr. But I think I'm using it wrong. My original call, slow but it works: df.median<-ddply(exp, .(groupname,starttime,fPhase,fCycle), n...