Skip to content

Commit

Permalink
Inlined longNeq; Additional cyclic checks, see 563; More profiling da…
Browse files Browse the repository at this point in the history
…ta; Array abuse and varint optimization
  • Loading branch information
dcodeIO committed Dec 16, 2016
1 parent 90b2012 commit 8f25377
Show file tree
Hide file tree
Showing 27 changed files with 367 additions and 311 deletions.
16 changes: 6 additions & 10 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
protobuf.js version: <fill in>
protobuf.js version: <please fill in>

### How to reproduce ###
<please describe the expected and actual behavior>

```js
<please add a code snippet>
<please provide a code snippet for reproduction>
```

### Expected behavior ###

<please describe>

### Actual behavior ###

<please describe>
```
<please paste the stack trace of the error if applicable>
```
10 changes: 9 additions & 1 deletion bench/prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (process.execArgv.indexOf("--prof") < 0) {
fs.unlink(file);
});
console.log("generating profile (may take a while) ...");
child_process.execSync("node --prof --trace-deopt " + process.argv.slice(1).join(' '), {
var child = child_process.execSync("node --prof " + process.argv.slice(1).join(' '), {
cwd: process.cwd(),
stdio: 'inherit'
});
Expand All @@ -40,10 +40,17 @@ if (process.execArgv.indexOf("--prof") < 0) {
// Actual profiling code
var protobuf = require("..");

protobuf.util.codegen.verbose = true;

var root = protobuf.parse(fs.readFileSync(require.resolve("../bench/bench.proto")).toString("utf8")).root;
var Test = root.lookup("Test");
var data = require("../bench/bench.json");

// Alternative mapbox data
/* var root = protobuf.parse(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.proto")).toString("utf8")).root;
var Test = root.lookup("vector_tile.Tile");
var data = Test.decode(fs.readFileSync(require.resolve("../tests/data/mapbox/vector_tile.bin")));*/

var count = process.argv.length > 3 ? parseInt(process.argv[3], 10) : 10000000;

function setupBrowser() {
Expand All @@ -66,3 +73,4 @@ switch (process.argv[2]) {
Test.decode(buf);
break;
}
process.exit(0);
Loading

0 comments on commit 8f25377

Please sign in to comment.