Skip to main content

I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

Hi MarkVo,

A few questions for you:

Which product version are you using?

Are you using an extfh.cfg file to set any configuration options in unmanaged that you are not setting in managed?

Are the files all local or are they located on a network share?

Do you use Fileshare?

Are you certain that it is the file I-o that is slower. I have seen applications where customers were writing file I-o and using the display statement for each I-o statement to show progress and it was actually the display statements that were causing the slow-down and not the I-o itself.

There are ways of improving the file i-o performance using extfh.cfg options like SEQDATBUF but they really should not make up for the difference that you mention here.

If you have a program that demonstrates this your best bet would be to open up a support incident with Customer Care so that we can test this in-house.


I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

Hi Chris,

Thank you for your reaction.

The product I'm using is ED 2.2.

I'm not using an extfh.cfg file.

The files are both created on my local machine.

I don't use FileShare

I have no display statements, except displaying a timestamp before and after the file i/o

At the office I have a solution in which I have the two projects. Tomorrow I'll open a supportline incident.

By the way, i made another managed project in which I replaced the tradional Cobol way of writing a file record by using the .Net StreamWriter class. This did improve the performance of the managed program significanty

Kind regards,

Mark de Vos


I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

Hi Chris,

Thank you for your reaction.

The product I'm using is ED 2.2.

I'm not using an extfh.cfg file.

The files are both created on my local machine.

I don't use FileShare

I have no display statements, except displaying a timestamp before and after the file i/o

At the office I have a solution in which I have the two projects. Tomorrow I'll open a supportline incident.

By the way, i made another managed project in which I replaced the tradional Cobol way of writing a file record by using the .Net StreamWriter class. This did improve the performance of the managed program significanty

Kind regards,

Mark de Vos


I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

Please open up an incident with Customer Care so we can take a look.

I would also recommend testing this under the latest product release which is 2.3 update 1.

Thanks,


I have made 2 console projects in Visual Studio 2012. One project is unmanaged, the other one is managed. In both projects I have basically the same program that writes a lot of lines to a line sequential file. I notice a big difference in performance. In the unmanaged project the program is alomst twice as fast. It looks as if in the unmanaged project buffering of the i/o is taking place, while in the managed environment the buffering is missing. Can anybody tell me what the cause is of the difference in performance? And, is there a way to improve the performance of the managed program?

Hi Chris,

I've already done that. The incident number is 2873608.

Kind regards,

Mark de Vos