performance

Why is it not good to use $_SESSION in Restful Implementations?

Original Question: i read that for RESTful websites. it is not good to use $_SESSION. Why is it not good? how then do i properly authenticate users without looking up database all the time to check for the user's roles? I read that it is not good to use $_SESSION. http://www.recessframework.org/page/towards-restful-php-5-basic...

Monitoring my web application performance from the client browser

Hi, I want to be able to monitor the performance(load time of the entire page, load times of individually downloaded js/cs files , amount of memory used by the browser for the page,etc) of my web application from the perspective of the user(i.e the browser client). Is there any tool/plugin , that can help me monitor all of these? ...

What can be done to speed up synchronous WCF calls?

My performance measurements of synchronous WCF calls from within a Silverlight application showed I can make 7 calls/s on a localhost connection, which is very slow. Can this be speeded up, or is this normal? This is my test code: const UInt32 nrCalls = 100; ICalculator calculator = new CalculatorClient(); // took over from the MSDN ca...

When calling CRUD check if "parent" exists with read or join?

All my entities can not be deleted - only deactivated, so they don't appear in any read methods (SELECT ... WHERE active=TRUE). Now I have some 1:M tables on this entities on which all CRUD operations can be executed. What is more efficient or has better performance? My first solution: To add to all CRUD operations: UPDATE ... JOIN ...

How does TopCoder evaluates code?

If you are familiar with TopCoder you know that your source-code gets a final "grade/points" this depends on time, how many compiles, etc, one of the highest weighted being performance. But how can they test that, is there some sort of simple code (java or c++) to do it that you could share for me to evaluate and hopefully write my own t...

C# Dictionary Loop Enhancment

Hi, I have a dictionary with around 1 milions items. I am constantly looping throw the dictionnary : public void DoAllJobs() { foreach (KeyValuePair<uint, BusinessObject> p in _dictionnary) { if(p.Value.MustDoJob) p.Value.DoJob(); } } The execution is...

How does oracle db writer decide whether or not to do multiblock / sequential writes.

Hi, We have a test system which matches our production system like for like. 6 months ago we did some testing on new hardware, and found the performance limit of our system. However, now we are re-doing the testing with a view to adding further hardware, and we have found the system doesnt perform as it used to. The reason for this ...

Improving performance of System.DirectoryServices.AccountManagement

I have a program that will let me manage users on our terminal server that we use to demo our software. I have been trying to improve the performace of adding users to the system (It adds the main account then it adds sub accounts if needed, for example if I had a user of Demo1 and 3 sub users it would create Demo1, Demo1a, Demo1b, and D...

Why is the new Tuple type in .Net 4.0 a reference type (class) and not a value type (struct)

Does anyone know the answer and/or have an oppinion about it? Since tuples would normally not be very large I would assume it would make more sense to use structs than classes for these. What say you? ...

How do you represent a normal or texture coordinate using GLshorts?

A lot of suggestions on improving the performance in iPhone games revolve around sending less data to the GPU. The obvious suggestion is to use GLshorts instead of GLfloat wherever possible, such as for vertices, normals, or texture coordinates. What are the specifics when using a GLshort for a normal or a texture coordinate? Is it poss...

How to know when to use indexes and which type?

I've searched a bit and didn't see any similar question, so here goes. How do you know when to put an index in a table? How do you decide which columns to include in the index? When should a clustered index be used? Can an index ever slow down the performance of select statements? How many indexes is too many and how big of a table do...

Why is foreach so slow?

PHPBench.com runs quick benchmark scripts on each pageload. On the foreach test, when I load it, foreach takes anywhere from 4 to 10 times as long to run than the third example. Why is it that a native language construct is apparently slower than performing the logic oneself? ...

Javascript: Does modifying scrollTop/scrollLeft trigger browser reflow?

I'm wondering if animating the scrollbars with Javascript triggers browser reflow. Any difference across different browser implementations? window.pageXOffset & window.pageYOffset document.documentElement.scrollLeft & document.documentElement.scrollTop document.body.scrollLeft & document.body.scrollTop Thanks! ...

Hadoop - job statistics

Hi, I used hadoop to run map-reduce applications on our cluster. The jobs take around 10 hours to complete daily. I want to know the time taken for each job, and the time taken by the longest job etc..so, that I can optimize those jobs. Is there any plugin or script that does this? Thank you Bala ...

Load Testing Multithreaded Java Application 1400 TPS Required

Hi All, I need to write a MultiThreaded Java Application that will be used to load test the MMS Server. Transactions starts when the MMS server indicates to my MultiThreaded Java Application that a MMS has arrived on the server and then i need to download the attachment that is part of the of the MMS from the MMS server using the protoc...

Does this javascript statement affects performance?

Hi guys, I'm writing a function add_event as the following shows: function add_event(o, event_type, callback, capture){ o = typeof o === "string" ? document.getElementById(o) : o; if(document.addEventListener){ add_event = function(o, event_type, callback, capture){ o = typeof o === "string" ? document.getEl...

Does importing a "non-relevant" dll has a performance penalty?

I'm using c#. In many cases I'm writing code that can benefit from a very simple class/method located in a "non-relevant" dll. For example, I'm writing some algorithm with no UI but it can benefit from a Point class in System.Drawing, or I need some xml manipulation method from System.Web even though I'm writing a console app (these are ...

Is there a way to throttle or limit resources used by a user in Oracle?

I have a multi-user web application and am encountering issues when a third party reporting application queries my Oracle 10g database. The reporting queries are slowing the system and impacting all other users. Is there a way to throttle this user's session so their queries don't impact the other users? ...

How do performance counter average timers get associated with their base?

I am adding some performance counters to my c# project and am creating a new PerformanceCounterCategory. In this category, I would like to have multiple counters/timers that track different things. I have a need to use multiple average timers and am trying to understand how the AverageBase counter gets associated with the correct Average...

Content-Length header versus chunked encoding

I'm trying to weigh the pros and cons of setting the Content-Length HTTP header versus using chunked encoding to return [possibly] large files from my server. One or the other is needed to be compliant with HTTP 1.1 specs using persistent connections. I see the advantage of the Content-Length header being : Download dialogs can show ...