emscripten-core / emscripten-core/emscripten

File system much slower than expected

Open
#13,758 1 comment 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I've noticed a significant slowdown when reusing an ofstream. If I do the following:
```
ofstream output;
output.open( filename, ios_base::trunc | ios_base::out | ios_base::binary );
output.close();
output.clear();
output.open( filename, ios_base::trunc | ios_base::out | ios_base::binary );

```
then writes to the file are 3 to 4 times slower than expected. Removing the last three lines, the speed is fine. Using a different ofstream to open the file is fine. Reusing the same ofstream is slow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.