[Mono-dev] file deletion poor performances using mono

Antonello Moro antonello.moro at elsagdatamat.com
Wed Mar 19 08:51:01 EDT 2008


Hi All,

I'm experiencing poor  mono performance on file and folder deletion, while
other file operations, like file creation, file reading, dir listing ecc,
have good performance.

My test:

Linux OS: RHEL4

Linux Kernel: 2.6.9-5.ELsmp

Linux FS: Ext3

Mono Runtime: Mono 1.9

Language: C#

Compiler: gmcs

 

The code I'm using:

 

Directory.Delete(path, true)

 

 

Deletion of a folder containing 3000 files of size 100KB takes 5 secs with
mono, while it takes .140 ms using the bash command "rm -rf <dirname>"

I have executed many tests, always having the same results.

 

I have tried listing the files in the folder and deleting file first (with
File.Delete(filePath) ) obtaining the same results.

I have made other tests on file creation, moving, reading and writing,
obtaining good performance, mono seems to perform bad only in case of file
deletion.

Do you have any idea why this happens? What can I do to improve this
operation (other than launching a bash command from c#)?

 

Thanks,

Antonello

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080319/fc684416/attachment-0001.html 


More information about the Mono-devel-list mailing list