HaxeFoundation / HaxeFoundation/haxe

[jvm] sys.io.File.read is a huge performance trap

Open
#11,487 2 comments 0 reactions 0 assignees View on GitHub
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

jprofiler_U1f4rNqre5

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.