performance

What's better? Having 100 Tables with each 1,000 rows, or 10 Tables with each 10,000 rows?

With 10 Tables, I would have no joins. With 100 Tables, I would have one join per query. Which would show better performance? ...

Importance of varchar length in MySQL table

I have a MySQL table where rows are inserted dynamically. Because I can not be certain of the length of strings and do not want them cut off, I make them varchar(200) which is generally much bigger than I need. Is there a big performance hit in giving a varchar field much more length than necessary? ...

std::map and 'fat' value objects

Hello! What's better from a performance point of view std::map<uint32_t, MyObject> or std::map<uint32_t. MyObject*> if MyObject is 'fat' (that is operator= rather expensive) and I have to insert/update/delete a lot ? ...

Java 2D game graphics

Next semester we have a module in making Java applications in a team. The requirement of the module is to make a game. Over the Christmas holidays I've been doing a little practice, but I can't figure out the best way to draw graphics. I'm using the Java Graphics2D object to paint shapes on screen, and calling repaint() 30 times a secon...

Is Aero contribute to WPF performance?

Hi, I've put off WPF development for a quite a while but, I'm finally thinking of moving ahead. I understand that WPF is totally new rendering "mechanism" which uses the GPU power (am I right?) unlike the CPU power that Winforms took up. If I'm not mistaking, this level of GPU support comes with Aero and therefore, a WPF app should run ...

Browser checks if modified(result=304) when not needed

I am trying to prevent If-modified request from client to server but I am failing. I think that I am missing something so I am attaching the HTTP communication of the two requests. I would expect that the second request will not be issued: GET XXXXX/js/Is.js HTTP/1.1 Accept: */* Referer: http://XXXXX/XXXXX/ Accept-Language: he UA-CPU: ...

A upgradable approach to design a web application system

Many poeple have online startups in their head that may potentially attracts millions, but most of the time you will only have minimal budget (time and resource) to start with so you want to have it delivered within a year's time. Short after launch, you are bound to perform one or a series of upgrades that may include: code refactor to ...

Measure time of a function with arguments in Python

I am trying to measure the time of raw_queries(...), unsuccessfully so far. I found that I should use the timeit module. The problem is that I can't (= I don't know how) pass the arguments to the function from the environment. Important note: Before calling raw_queries, we have to execute phase2() (environment initialization). Side not...

Is IronRuby ScriptSource.Execute thread safe?

We are implemented expression evaluator via hosting IronRuby engine. Simplified version of evaluator you can see here. Now we are trying to get more performance from IronRuby via executing expressions in many threads (and we got it). One question bothers us - is Execute method thread safe? ...

Python Idiom. Need Clarification.

From http://jaynes.colorado.edu/PythonIdioms.html "Build strings as a list and use ''.join at the end. join is a string method called on the separator, not the list. Calling it from the empty string concatenates the pieces with no separator, which is a Python quirk and rather surprising at first. This is important: stri...

Can't find "requests/sec" performance counter in "asp.net applications" category on a windows server 2003

I have two pressure test machines, one of them can't display the correct performance counter, the requests/sec performance counter in asp.net applications category didn't update, and, can't find W3SVC...... instance to choose ... any one got this wired problem before? ...

Casting performance in Java

I've a Servlet filter which performs the following type cast: HttpServletRequest httpRequest = (HttpServletRequest) req; At present my filter is responsible for two tasks that would be better separated into two filters. If I'd split the logic into two filters I'd need two casts. What is the performance impact of such a cast? Is it wo...

Performance comparison between IronRuby and IronPython

We're aiming to implement a scripting mechanism, using DLR's Microsoft.Scripting and hosting assembly. Now, someone knows about any performance difference between IronRuby 1.0 and IronPython 2.6? To my understanding they have different compilers, but IronPython seems more mature and tested, but if anyone has documentation or knowledge ...

Entire jar is read for every getResourceAsStream

Hi I am profiling a java applet startup time. I have noticed that a huge jar of size 5MB is fully read every time a resource from the jar is requested. E.g. images log configuration files, I18N files etc.... Sould it behave that way? Is it possible just to jump to the correct point ? Is it possible to read the file only once? If I will...

# of marshalling Performance Counter

I am trying to determine if the COM interop is becoming a bottle neck in my software. This article on MSDN helps http://msdn.microsoft.com/en-us/library/ms998579.aspx#scalenetchapt15%5Ftopic11. But I really do not have have a point of reference for a "normal" or "high" value for # of marshalling to determine if it is impacting performanc...

What is the best way to periodically load data into table

I have a database with static tables which require to be updated from CSV weekly. Tables are Mysql MyISAM and by static i mean they are used for read only (except when updated from CVS, obviously). There're about 50 tables and in total about 200mb of data to be reloaded weekly. I can think about 3 ways: Truncate table Load data from ...

optimizing with IEEE floating point - guaranteed mathematical identities?

I am having some trouble with IEEE floating point rules preventing compiler optimizations that seem obvious. For example, char foo(float x) { if (x == x) return 1; else return 0; } cannot be optimized to just return 1 because NaN == NaN is false. Okay, fine, I guess. However, I want to write such that the ...

How big is FTP performance load in PHP?

Hello, I have a PHP script on a domain (say example.com) and this domain has three subdomains: a.example.com b.example.com c.example.com IP addresses of this all this domains is xxx.yyy.zzz.ddd and domains differ only in last octet ("ddd" part). I think it's quite ordinary for subdomains. My question is if this fact will improve th...

Is connecting to DB still costlier ?

Hi All, I'm relatively newbie to ASP.NET, and just building my second realtime webapplication. When I was learning ASP.NET a year back, I have been told "It is costlier to connect and grab data from database, so make as much less connection as possible and re-use the retrieved data effectively". The reasons given are A connection t...

SQL Server 2008 FILESTREAM performance

I had some questions around the FILESTREAM capability of SQL Server 2008. What would the difference in performance be of returning a file streamed from SQL Server 2008 using the FILESTREAM capability vs. directly accessing the file from a shared directory? If 100 users requested 100 100Mb files (stored via FILESTREAM) within a 10 seco...