performance

NHibernate Performance on an internet banking application

Currently we have a project to implement an Internet Banking site, and we are evaluating using Nhibernate on it. ¿Is NHibernate suitable for this kind of application, where performance is important and there will be a large quantity of users doing operations simultaneously? ¿Do you know any successfull stories of using NHibernate in th...

Dynamic compilation for performance

Hello everyone, I have an idea of how I can improve the performance with dynamic code generation, but I'm not sure which is the best way to approach this problem. Suppose I have a class class Calculator { int Value1; int Value2; //.......... int ValueN; void DoCalc() { if (Value1 > 0) { DoValue1RelatedStuf...

Just how scalable is Grails?

I'm looking to make a website that will probably get some heavy, repetitive traffic. Is grails up to the task? ...

What are some Performance [Dos/Don'ts] in C# -ASP.NET

I am finalizing one of my projects and taking a look over the whole project looking for mistakes, bugs and performance mistakes. I am using MVC. I caught one Don't and that is: Never put a RenderPartial within a loop. it will drastically slow down your whole server. ...

Why does implicitly calling toString on a value type cause a box instruction

Hi This is more a 'wonder why' than a specific issue but look at the following code static void Main(string[] args) { int val = 10; Console.WriteLine("val is {0}", val); // (1) Console.WriteLine("val is {0}", val.ToString()); //(2) } In case (1) the following IL is output ...

File copying in Java

What is a better option (in terms of performance): copying a file using fileinputstream and fileoutputstream or running a OS specific command copy command from Java? ...

How to 'insert if not exists' in MySQL?

I started by googling, and found this article which talks about mutex tables. I have a table with ~14 million records. If I want to add more data in the same format, is there a way to ensure the record I want to insert does not already exist without using a pair of queries (ie, one query to check and one to insert is the result set is e...

Automate printing & dealing with large HTML files

I wrote a simple PHP application to create salary cheques for the company employees. The interaction between db & app is nice, the data is cached & the performance is high enough. So, what's the problem? I need to provide the ability to print the whole cheques by just one click for the end-user. printing such a large HTML file is not ...

Slow MySQL inserts

I am using and working on software which uses MySQL as a backend engine (it can use others such as PostgreSQL or Oracle or SQLite, but this is the main application we are using). The software was design in such way that the binary data we want to access is kept as BLOBs in individual columns (each table has one BLOB column, other columns...

Maximum size of Actor Queues?

I'm considering using Actors in a system to wrap some storage (could be a database, could be an in-memory collection). The reason I want to do this is because I don't want calls to the store to be blocking from the code that's calling it and I intend to push a high volume of messages through. Could an actor's inbound message queue handl...

Best performance when using a stretchable UIImage

Hi there, I need to use a stretchable UIImage hundreds of times in my app in multiple UIImageViews. Is it okay to globally reuse the same stretchable UIImage instead of having to recreate them in memory each time I need to add it to a UIImageView? I know [UIImage imageNamed:] caches images for better performance, but this cannot be use...

Question about LINQ2Sql performance in C#

Hey SO: From a performance perspective, is it better to wrap each statement that utilizes LINQ in a using() statement, or to declare a class-level instance and use in each method? For instance: public void UpdateSomeRecord(Record recordToUpdate) { using(var entities = new RecordDBEntities()) { // logic here... } } p...

Encapsulation severely hurts performance??

I know this question is kind of stupid, maybe it's a just a part of writing code but it seems defining simple functions can really hurt performance severely... I've tried this simple test: def make_legal_foo_string(x): return "This is a foo string: " + str(x) def sum_up_to(x): return x*(x+1)/2 def foo(x): return [make_lega...

Can WPF run without DirectX?

This might sound like a stupid question but ... will WPF stop running in absence of a DirectX/Direct3D capable graphics card/drivers or will it just run slower? I know WPF is based on DirectX/Direct3D (even for simple controls) but I cannot find any reference on the topic which provides a good overview of borderline scenarios. Any hel...

With 2 nested gridviews with large data sets each what's the most optimized way to implement

Say I have 2 tables in a database, each with 100,000's of rows in detail and 10,000's of rows in the master 5 columns each, properly indexed and related. I want to have master/detail nested gridviews. What's the fastest architecture I could design in .net to do this? The largest result set on the master could be in the thousands (usua...

Improve db4o linq query

Hello, I got a problem with this linq query: from PersistedFileInfo fi in m_Database from PersistedCommit commit in m_Database where commit.FileIDs.Contains( fi.ID ) where fi.Path == <given path> select new Commit( m_Storage, commit ); As you can see, every PersistedCommit contains a Collection<int> called FileIDs which connects it t...

Performance problems when scaling MSVC 2005's operator<< accross threads.

When looking at some of our logging I've noticed in the profiler that we were spending a lot of time in the operator<< formatting ints and such. It looks like there is a shared lock that is used whenever ostream::operator<< is called when formatting an int(and presumably doubles). Upon further investigation I've narrowed it down to this ...

how to decide between a rewrite or a hardware upgrade?

If you had a working product that was slow and memory hungry. What would decide to do between these 2 options and why? The product would work perfectly if you buy "the" good server which would be high in the 5 digits and maybe in the 6 digits. You have the sources and the resources to change it and it would cost about the same of opt...

Performance of comparisons in C++ ( foo >= 0 vs. foo != 0 )

Hi there, I've been working on a piece of code recently where performance is very important, and essentially I have the following situation: int len = some_very_big_number; int counter = some_rather_small_number; for( int i = len; i >= 0; --i ){ while( counter > 0 && costly other stuff here ){ /* do stuff */ --coun...

Apache Redirects/Rewrite Maximum

I have a migration project from a legacy system to a new system. The move to the new system will create new unique id's for the objects being migrated; however, my users and search indexes will have the URLs with the old ids. I would like to set up an apache redirect or rewrite to handle this but am concerned about performance with that ...