Skip to content

Commit 8f25377

Browse files
committed
Inlined longNeq; Additional cyclic checks, see 563; More profiling data; Array abuse and varint optimization
1 parent 90b2012 commit 8f25377

27 files changed

+367
-311
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
protobuf.js version: <fill in>
1+
protobuf.js version: <please fill in>
22

3-
### How to reproduce ###
3+
<please describe the expected and actual behavior>
44

55
```js
6-
<please add a code snippet>
6+
<please provide a code snippet for reproduction>
77
```
88

9-
### Expected behavior ###
10-
11-
<please describe>
12-
13-
### Actual behavior ###
14-
15-
<please describe>
9+
```
10+
<please paste the stack trace of the error if applicable>
11+
```

bench/prof.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (process.execArgv.indexOf("--prof") < 0) {
1919
fs.unlink(file);
2020
});
2121
console.log("generating profile (may take a while) ...");
22-
child_process.execSync("node --prof --trace-deopt " + process.argv.slice(1).join(' '), {
22+
var child = child_process.execSync("node --prof " + process.argv.slice(1).join(' '), {
2323
cwd: process.cwd(),
2424
stdio: 'inherit'
2525
});
@@ -40,10 +40,17 @@ if (process.execArgv.indexOf("--prof") < 0) {
4040
// Actual profiling code
4141
var protobuf = require("..");
4242

43+
protobuf.util.codegen.verbose = true;
44+
4345
var root = protobuf.parse(fs.readFileSync(require.resolve("../bench/bench.proto")).toString("utf8")).root;
4446
var Test = root.lookup("Test");
4547
var data = require("../bench/bench.json");
4648

49+
// Alternative mapbox data
50+
/* var root = protobuf.parse(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.proto")).toString("utf8")).root;
51+
var Test = root.lookup("vector_tile.Tile");
52+
var data = Test.decode(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.bin")));*/
53+
4754
var count = process.argv.length > 3 ? parseInt(process.argv[3], 10) : 10000000;
4855

4956
function setupBrowser() {
@@ -66,3 +73,4 @@ switch (process.argv[2]) {
6673
Test.decode(buf);
6774
break;
6875
}
76+
process.exit(0);

0 commit comments

Comments
 (0)