all groups > visual studio .net general > february 2007 >
You're in the

visual studio .net general

group:

VS Net 2005 built application I/O speed issue


VS Net 2005 built application I/O speed issue Pat Moran
2/28/2007 9:23:52 AM
visual studio .net general:
We have noticed a significant decrease in the performance of I/O when an
application is built with 2005 as opposed to 2003.

The application uses a combination of putc, fprintf and vfprint and the
time taken to process the same data has increased as shown below

2003 30.0610
2005 nolock 36.0420
2005 lock 38.6810

We get a smaller incresse when we force no locking to be used.
Has anybody else noticeds this and pinned down the problem.

RE: VS Net 2005 built application I/O speed issue lukezhan NO[at]SPAM online.microsoft.com
3/1/2007 12:00:00 AM
Hello,

can you provide a sample project which can reproduce the problem with
VS.NET? We will perform further research on the project to see what
happened.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


RE: VS Net 2005 built application I/O speed issue Pat Moran
3/1/2007 9:05:15 AM
Luke,

The test program I have is shown below


#include <stdio.h>
#include <time.h>


void main(int argc, char *argv[]) {
int i;
time_t start,endtime;

time(&start);
for (i=1; i<argc;++i) {
FILE *f;
int c;
fprintf(stderr, "argv[%d]=%s\n", i, argv[i]);
if ((f = fopen(argv[i], "r")) == NULL) {
char buff[1000];
//snprintf(buff, 1000, "Cannot open %s. Skipping...\n", argv[i]);
sprintf(buff, "Cannot open %s. Skipping...\n", argv[i]);
perror(buff);
continue;
}
while(EOF != (c=getc(f)))
putc(c, stdout);
fclose(f);
}
time(&endtime);
fprintf(stderr,"Elapsed (secs) = %6.3f\n",difftime(endtime,start));
}

I am building it with the command lines

2003:
cl -GF -D_CRT_SECURE_NO_DEPRECATE /wd 4430 /wd 4996 -F0x1000000 -O2 -Oy-
-Ob2 -Zi -GS- my_cat.c -o my_c

2005:
cl -GF -D_CRT_SECURE_NO_DEPRECATE /wd 4430 /wd 4996 -F0x1000000 -O2 -Oy-
-Ob2 -Zi -GS- my_cat.c -o my_cat.2005.exe

I mam running it with a command line of

my_cat.2003.exe input input input input >output
my_cat.2005.exe input input input input >output

The input file is a text file of around 28Mbytes.

The 2003 takes 26 seconds and the 2005 is taking 61 seconds.

Our actual application uses fprint etc as well but this is the simplest
example I have to show the difference.

Thanks




[quoted text, click to view]
RE: VS Net 2005 built application I/O speed issue lukezhan NO[at]SPAM online.microsoft.com
3/5/2007 12:00:00 AM
Hi,

Thank you for the code. I will perform research on these and get back to
you ASSP.

Sincerely,

Luke Zhang

Microsoft Online Community Support
This posting is provided "AS IS" with no warranties, and confers no rights.


RE: VS Net 2005 built application I/O speed issue lukezhan NO[at]SPAM online.microsoft.com
3/6/2007 12:00:00 AM
Hello,

According consulting resource, there are some additional validation checks
used irrespective of whether you use _CRT_SECURE_NO_DEPRECATE or not, in
VS.NET. This may be cause of increased time. Ultimately you will have
profile 2003 and 2005 applications to find the cause.

Sincerely,

Luke Zhang

Microsoft Online Community Support
This posting is provided "AS IS" with no warranties, and confers no rights.


RE: VS Net 2005 built application I/O speed issue Pat Moran
3/7/2007 7:36:00 AM
Can you point me at any documentation describing what these additional checks
are and is there anyway to turn them off.

[quoted text, click to view]
RE: VS Net 2005 built application I/O speed issue lukezhan NO[at]SPAM online.microsoft.com
3/8/2007 12:00:00 AM
Hello,

I afraid of that these are undocument. If you really have concern on this,
I suggest you may submit a support incident to our PSS, Which sholud be
better way to handle such issue.

Sincerely,

Luke Zhang

Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


RE: VS Net 2005 built application I/O speed issue Pat Moran
3/8/2007 4:01:08 AM
Thanks Luke, I have already done that.

[quoted text, click to view]
AddThis Social Bookmark Button