performance

What is an acceptable web page footprint?

There is a carousel project, which currently loads all the images upfront, but the size is getting bigger each week. More and more images are being added beyond the original design. Someone asked me; What is an acceptable web page footprint? My knee jerk reaction was to suggest lazy-loading of images, but that's not what they asked me....

how to choose proper architecture for site similar tu autoscout.de

Hello, I've got an idea to launch couple of online adds websites similar to autoscout.de, where users could post their advertisements etc. How should such a solution be designed from technical point of view? what CMS to choose? What DB system to choose etc? Thanks in advance for your replies. ...

Effectively (in terms of performance) store and use set values in MySQL

I need to store set value in MySQL column. I completely like the build-in SET type, but it seems that FIND_IN_SET() function requires table scan which is bad. It seems that SET uses binary values under the hood. If I use binary value to represent a set, for example for a set of four elements it could be something like this: 0100 0101 0...

BIT(1) vs ENUM('unknown', 'male', 'female') in MySQL

In performance terms, what will be faster, use a BIT(1) NULL (null = unknown, 0 = male, 1 = female) or ENUM('unknown', 'male', 'female') NOT NULL DEFAULT 'unknown' in MySQL MyISAM? Or this is considered micro-optimization? [EDIT] I think I'm going to use ENUM('male', 'female') DEFAULT NULL ...

Why is my code not using available processor cycles?

I have written a plugin for ESRI ArcEditor that runs some validation checks on a road network. To check if the rules are all satisfied, it basically does a whole bunch of different intersects, with some buffering and envelopes etc. on the selected features. It has been written in C#. Now what I am noticing is that it really takes a lon...

What's the faster way to implement the signed-to-unsigned map r(x)= 2x-1 if x>0 and r(x) = 2x otherwise

Mapping signed to unsigned integers bijectively can be done using common techniques like Two's complement. Unfortunately, they fail to map small negative integers to small numbers. For compression algorithms, we often want to preserve the absolute value of numbers as much as possible: small negative and positive numbers must be mapped to...

What's the fastest way to keep an ordered map in javascript ?

I use a javascript object as a map. Let's say I populate it like this: for (var i=0;i<100;i++) { var key = "A"+(i%10); oj[key] = i; } This creates a map with 10 keys. The value of 100 and 10 are just fictitious. it could be 10000 events which create a map of 3000 or similar. I now want to print the map alphabetically: // ...

Hibernate: Query cache never used

Hi, During performing some performance tuning in my application I have noticed, that hibernate query cache is never used. I am quite sure I have it properly set up: hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider hibernate.cache.use_query_cache=true I use setCacheable(true) on queries I want to cache I have set u...

Does it matter where I check part of a composite key when joining two tables in SQL Server?

I'm joining two tables on a composite key, and I'm wondering if it matters where I compare the corresponding columns when I do the join. Say I have a table, TableA, with columns ColAFoo, ColAFoo2, and ColABar. TableA has a composite primary key comprising ColAFoo and ColAFoo2 (PK_TableA). I also have TableB, with ColBFoo, ColBFoo2, an...

What is the minimum guaranteed time for a process in windows?

I have a process that feeds a piece of hardware (data transmission device) with a specific buffer size. What can I reasonable expect from the windows scheduler windows to ensure I do not get a buffer underflow? My buffer is 32K in size and gets consumed at ~800k bytes per second. If I fill it in 16k byte batches that is one batch every...

How to test CSS selector performance?

How would I go about testing the performance benchmarks of different css selectors? I've read articles like this. But I don't know if it is applicable to my website because he used a test page with 20000 classes and 60000 DOM elements. Should I even care,does performance really get downgraded that much based upon the css strategy you ta...

Does it matter where I check part of a composite key when joining in SQL Server using a user-specified value for part of the join?

(this question is very similar to my previous question Does it matter where I check part of a composite key when joining two tables in SQL Server?) I'm joining three tables on a composite key, with the value of one of the columns being determined by user input. I'm wondering if it matters where I compare the corresponding columns when ...

Core Data on iPhone and Performance

I'm trying to import a large amount of data into a core data store on the iPhone. I'm using a SQLite backing for the core data store. It seems to be taking way longer than I would expect it to. I've trimmed down the routines so that it is basically just attempting to a fetch an object (to see if it already exists) and then create a new o...

Keep a global variable or recreate a local variable in c?

Hello, I've been programming with Java for Android quite some while now. Since performance is very important for the stuff I am working on I end up just spamming global variables. I guess everyone will come rushing in now and tell me this is the worst style ever, but lets keep it simple. For Android, local variables means garbage collec...

WPF Poor Performace for static scenes with very small dynamic content.

I have a simple scene with 64 ModelUIElement3D elements, every element3d Model is a model group with 8 simple geometries, every geometry contains 3 materials, diffuse, specular and emissive. All materials use Solid Brushes since are the fastest. The geometries, specular material and diffuse material are Freeze to improve performance. ...

Java NIO vs DotNet IO Performance

Hi, Does anyone know what the performance difference is between Java NIO vs DotNet IO performance. Reading this question, it seems that standard Java-IO and DotNet-IO have very similar IO performance. What is interesting to me is that the Java guys state that mass file copying, file server based operations...etc should be a lot quic...

firstorDefault performance rising

part of the code: Dictionary<Calculation, List<PropertyValue>> result = new Dictionary<Calculation, List<PropertyValue>>(); while (reader != null && reader.Read()) //it loops about 60000, and it will be bigger { #region create calc and propvalue variables //... #endregion //this FirstOrDefault needs a lot of time tm...

ASP.NET MVC 2 - Avoiding repeatedly querying the database for static data?

What can I do to avoid the repeated loading of static data every time a page is loaded in ASP.NET MVC2? This is pretty wasteful, and I would like to fix it. My master page has the typical User Name + Company Name display in the top right corner. But because of the stateless nature of MVC, this data has to be looked up every single time...

("" OR null) VS NOT(!"" AND NOT NULL) in where clause

Does anyone know if there is a performace differance between the following we parts of a where SQL string in mysql? WHERE ... AND (field = "" OR field IS NULL); and WHERE ... AND (NOT (field != "" AND field IS NOT NULL)); ...

How do I set DataAdapter.UpdateBatchSize to a "optimal" value?

Hi there, I've finally gotten my insert batch to work and now I've been fiddling with the size of the batch, but I can't see any difference in performance between a value of 50 and a value of 10000. This seems very odd to me, but I don't know what's happening behind the scene, so it might be normal behavior. I'm inserting 160k rows int...