HaxeFoundation / HaxeFoundation/haxe
[jvm] sys.io.File.read is a huge performance trap
Open
platform-jvm
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
import haxe.io.Input;
import haxe.io.BytesInput;
function main() {
var input:Input = sys.io.File.read("eval.zip");
// input = new BytesInput(input.readAll()); // that line
try {
var zip = haxe.zip.Reader.readZip(input);
trace("Read");
} catch (e:Dynamic) {
trace(e);
}
input.close();
}
```
target | without that line | with
--- | --- | ---
JVM | 8.101 | 0.637
Eval | 7.781 | 8.454
HL | 2.463 | 1.952
C++ | 5.486 | 2.879
Contributor guide
Assessment
This issue has not been assessed yet.