I have the following extension method
public static T Field<T>(this DataRow row, string columnName)
{
return (T)Convert.ChangeType(row[columnName], typeof(T));
}
It works, but I'm trying to speed it up. Is there a way to speed that up? With a case statement and then type specific conversions? I've tried a few things like using ...
I wrote a WCF service that should transform any size of files, using the Streamed TransferMode in NetTcpBinding, and System.IO.Stream object.
When running performance test, i found significant performance problem.
Then I decided to test it with Buffered TransferMode and saw that performance is two times faster!
Because my service shoul...
I'm a PhD student and use Python to write the code I use for my research. My workflow often consists of making a small change to the code, running the program, seeing whether the results improved, and repeating the process. Because of this, I find myself spending more time waiting for my program to run than I do actually working on it...
I see it used a lot, but haven't seen a definition that makes complete sense.
Wiktionary says "characterized by an adequate or excellent level of performance or efficiency", which isn't much help.
Initially I though performant just meant "fast", but others seem to think it's also about stability, code quality, memory use/footprint, or...
The word has it FillChar is about the fastest way to fill a patch of memory with bytes of the same value (not zero, for that there's ZeroMemory), but is there an equivalent to fill memory with a sequence of the same (four byte) integer or cardinal value? Something like FillInt or FillLongWord?
...
If a PHP session variable is stored on file (like it is by default) then let's say I store a user's name into a session variable...
$_SESSION['username'] = 'Jason Davis';
Now when a page is built, if I call $_SESSION['username'] 100 times in the process of building a page, would it hit the session files and do a read on them 100 tim...
I have a widget that is inserted on numerous Web pages. It's composed of some JavaScript that loads an HTML document from my server (as JSONP) which is then inserted into a dynamically created <iframe> on the page where the widget is deployed.
I use Clicky for analytics/tracking to measure the number of pageviews that my widget's host p...
In my project I have some code which has been deveoped in VBA and it calls functions from different C# DLLs. currently the performance of the code has been degraded and I am planning to check in which function/dll most of the execution time is spent.
Kindly let me if any tool is available to check the same.
...
Hi All,
I have an application that performs HTTP posts at regular intervals (data retrieved from SQL). Every 30 seconds a maximum of 50 threads are spawned and run HTTP posts concurrently. If a post fails, it waits 2x as long as the interval is set to. This will happen twice. So for instance, 30s, 60s then 120s.
I am using a normal Thr...
I am wanting to know if there is any extra overhead of using an Object in PHP instead of using a static method based on my examples below?
Sesseion object from Session class
$session = new Session;
$session->set(user_id, $uswer_id); //set session var
$session->get(user_id); // get session var
VS
Static methods from ...
in certain applications, I have need to collapse nested loops into one while retaining individual index information.
for j in N:
for i in M:
... A(i,j) ...
// Collapse the loops
for ij in MN:
... A(i,j) ...
so have looked at the obvious ways to recover i,j from ij using division/modulo (expensive operation) and using if stat...
hi all,
I am doing a project on an Embedded Device which has ARM926Ej-S processor.I need to performance analysis of the algorithm on the device. I am new to embedded environment and don't have much idea of what is performance analysis for embedded devices.
Can some one tell what parameters should i consider for analysis?
How to go abou...
Ahhhw, every time is so frustrating..
We have a dedicated server in our hosting company, and everytime i have to write down a new app (or an add to an pre-existing app), i use to 'lose' some time to optimize the code for many behaviors (reducing the db query, optimizing the db structure, reducing the bandwith, etc..) depending on what t...
Conventional wisdom tells us that high-volume enterprise java applications should use thread pooling in preference to spawning new worker threads. The use of java.util.concurrent makes this straightforward.
There do exist situations, however, where thread pooling is not a good fit. The specific example which I am currently wrestling wit...
I have a WCF client proxy which reads from a SOAP web service. I do not control the service, only the client proxy. The result of invoking one of the operations of the service is defined as a very large XML schema, of which only a small subset is relevant in my application.
I have created a custom WCF behavior which allows me to parse t...
I've been reading recently about cache-oblivious data structures like auxiliary buffer heaps. These data structures work by keeping their most-recently-accessed elements in cache memory so any subsequent access is also quicker.
Most of these data structures are implemented with a low-level language like C/C++. Is it worth it to try to p...
Hello,
we've got a GWT application with a simple search mask displaying the results as a grid.
Server side processing time is ok as well as network latency.
Client rendering time is ok even on low spec hardware with internet explorer 6 as long as the number of results is not too high (max 100 rows in the grid).
We have implemented ...
I'm trying to learn a bit more about LINQ by implementing Peter Norvig's spelling corrector in C#.
The first part involves taking a large file of words (about 1 million) and putting it into a dictionary where the key is the word and the value is the number of occurrences.
I'd normally do this like so:
foreach (var word in allWords) ...
This is the query I'm performing (without some Joins that are not relevant):
SELECT a.*, c.id
FROM a
LEFT OUTER JOIN b ON a.id = b.id_anunciante
LEFT OUTER JOIN c ON c.id = b.id_rubro
GROUP BY a.id
Each row of "a" is linked with 1 to 5 rows in "b".
The problem is that GROUP BY has performance issues (it takes 10x or more using GROUP ...
Is there any performance benefit (particularly in C++ or Java) in keeping the size of try block small [aside from it being more informative to the reader as to which statement can throw].
Given the following method where i do not want to throw out of the method.
void function() throws Exception
{
statement1
statement2
state...