performance

Performance of .NET ILMerged assemblies

I have two .NET libraries: "Foo.Bar" and "Foo.Baz". "Foo.Bar" is self-contained, while "Foo.Baz" references "Foo.Bar". Assuming I do the following: Use ILMerge to merge "Foo.Bar.dll" with "Foo.Baz.dll" into "Foo1.dll". Create a new solution containing the entirity of both "Foo.Bar" and "Foo.Baz" (since I have access to their source co...

Can writing to logfiles seriously slow down your application?

I'm using Log4Net to write logs to files. Can this serioulsy slow down my application? I know it depends on how much I'm writing away, but let's say that some hundreds of logs can be written per second. ...

mysql statement with nested SELECT - how to improve performance

This statement appears inefficient because only one one out of 10 records are selected and only 1 of 100 entries contain comments. What can I do to improve it ? $query = "SELECT A,B,C, (SELECT COUNT(*) FROM comments WHERE comments.nid = header_file.nid) as my_comment_count FROM header_file Where A = 'admin' " edit: ...

Prepending to a multi-gigabyte file.

What would be the most performant way to prepend a single character to a multi-gigabyte file (in my practical case, a 40GB file). There is no limitation on the implementation to do this. Meaning it can be through a tool, a shell script, a program in any programming language, ... ...

What is the cost of object creating.

Hi If I have to choose between static method and creating an instance and use instance method, I will choose static methods always. but what is the detailed overhead of creating an instance? for example I saw a DAL which can be done with static classes but they choose to make it instance now in the BLL at every single call they call so...

mysql query performance help

Hi I have a quite large table storing words contained in email messages mysql> explain t_message_words; +----------------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------+------+-----+---------+----------------+ | mwr_key | int(11...

Poorly performing regex

I've a really poorly performing piece of regex, currently it makes Firefox, Chrome and IE hang for a period of time. Here's the reg-ex: ^([a-zA-Z0-9]+[/]?)+[a-zA-Z0-9]+$ It's kind of a url matcher, but should only match the requested path (not starting with or ending with a slash). Valid examples: Segment Segment/Segment segment/...

Serial Ports, CreateFile and SetCommState

I'm using Windows API's CreateFile and SetCommState functions to open a number of serial ports to read and write from, selecting ports using this notation: \\?\COM1 I've been logging performance closely, and for some odd reason the CreateFile call takes about as much time as the SetCommState calls do (about 4.1 seconds). I find t...

devArt's dotConnect for Oracle vs. ODP.net/OCI performanc.

Does anybody have any experience going from ODP.net to devArt's dotConnect for Oracle? Some initial testing is showing Direct Connect in 64bit dotConnect running 30% slower at times than our original ODP.net/OCI 32 bit solution. Trying to determine if that's normal or if something may be wrong in my testing approach. Thanks! ...

Why should I use SQL Server's BETWEEN ... AND syntax?

These two statements are logically equivalent: select * from Table where someColumn between 1 and 100 select * from Table where someColumn >= 1 and someColumn <= 100 Is there a potential performance benefit to one versus the other? ...

jQuery.keypad Performance Issues

I am working on a Kiosk Touch Screen application and using the JQuery.keypad plugin and noticing some major performance issues. If you click a number of buttons in rapid succession the CPU gets pegged, the button clicks don't keep up with the clicking and some button presses even get lost. On my dev machine this isn't as noticeable, but ...

How to speed up dumping a DataTable into an Excel worksheet?

I have the following routine that dumps a DataTable into an Excel worksheet. private void RenderDataTableOnXlSheet(DataTable dt, Excel.Worksheet xlWk, string [] columnNames, string [] fieldNames) { // render the column names (e.g. headers) for (int i = 0; i < columnNames.Len...

How to get a count of ManagementObjects (WMI results) without enumerating through the collection in .NET

When querying for large ammount of data through WMI (say the windows events log Win32_NTLogEvent) it is very useful to know what kind of numbers you are getting yourself into before downloading all the content. Is there a way two do this? From what i know there is no "Select Count(*) FROM Win32_NTLogEvent" in WQL. From what i know the ...

Read large amount of data from file in Java

Hello I've got text file that contains 1 000 002 numbers in following formation: 123 456 1 2 3 4 5 6 .... 999999 100000 Now I need to read that data and allocate it to int variables (the very first two numbers) and all the rest (1 000 000 numbers) to an array int[]. It's not a hard task, but - it's horrible slow. My first attempt ...

Common causes of slow performing jQuery and how to optimize the code?

Possible Duplicates: Javascript (jQuery) performance measurement and best practices (not load time) Good ways to improve jQuery selector performance? Hello, This might be a bit of a vague or general question, but I figure it might be able to serve as a good resource for other jQuery-ers. I'm interested in common causes o...

IIS hosting performance

Hi all, I just generated a question in my mind: Will IIS service take much resources when nobody is using the service? For example: If I host Facebook website on my laptop and people in the work access my website, I am sure my laptop will stop working. However, if nobody use my Facebook, will IIS still takes much resouces because Faceb...

Hibernate Relationship Mapping/Speed up batch inserts

I have 5 MySQL InnoDB tables: Test,InputInvoice,InputLine,OutputInvoice,OutputLine and each is mapped and functioning in Hibernate. I have played with using StatelessSession/Session, and JDBC batch size. I have removed any generator classes to let MySQL handle the id generation- but it is still performing quite slow. Each of those table...

UITableView Scrolling Performance and semitransparent views - does it matter only in the table?

I have a UITableView which only takes like 3/4 of the screen, but not the entire screen. Now I wonder if it matters to scrolling performance a lot, if outside the UITableView there are views with alpha 0.5? When a table view scrolls, is the entire screen affected with compositing and drawing, or only the frame of the table view? ...

Is there a way to rewrite the SQL query efficiently

hi, I have two tables with following definition TableA TableB ID1 ID2 ID3 Value1 Value ID1 Value1 C1 P1 S1 S1 C1 P1 S2 S2 C1 P1 S3 S3 C1 ...

bad performance from too many caught errors?

I have a large project in C# (.NET 2.0) which contains very large chunks of code generated by SubSonic. Is a try-catch like this causing a horrible performance hit? for (int x = 0; x < identifiers.Count; x++) {decimal target = 0; try { target = Convert.ToDecimal(assets[x + identifiers.Coun...