Poco::FileStream std::fstream #4565
Replies: 6 comments 1 reply
-
|
Probably I realized that the Poco::FileStream has a better handle of error exceptions |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I think the main reason for FileStream was to handle unicode file names |
Beta Was this translation helpful? Give feedback.
-
|
I changed the code to insert this constructor the performance are comparable to std::fstream Obviously I had to change even FileIOS as well |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
I don't see resizeBuffer in my source code, from which version is there that function? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I recently done some tests about speed of writing file: in my case is a write to a samba share folder, but it's quite the same on a local drive. I found that if I write 24MB of data file with Poco::FileStream it takes about 2seconds, if I try with std::fstream it takes about 200 milliseconds
I think the reason is the "buffer class" between the FileStream and the WriteFile to disk (I'm using windows for these test), because it writes 4096 byte at a time (FileStreamBuf::BUFFER_SIZE). I think we already discuss here on an old post about it, but I don't remember what was the solution.
I think probably because std::fstream is c++ portable there's no reason to use Poco::FileStream or do you think that in some specific environment will be better using Poco::FileStream
Beta Was this translation helpful? Give feedback.
All reactions